chewbyte

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportFile

func ExportFile(data interface{}, path string, format FormatHint) error

func ExportStr

func ExportStr(data interface{}, format FormatHint) (string, error)

func FindFiles

func FindFiles(config FinderConfig) ([]string, error)

func ImportFile

func ImportFile(path string) (interface{}, error)

func ImportFiles

func ImportFiles(paths []string, mergeStrategy MergeStrategy) (interface{}, error)

func ImportStr

func ImportStr(content string, filenameHint string) (interface{}, error)

Types

type FinderConfig

type FinderConfig struct {
	// contains filtered or unexported fields
}

func NewFinderConfig added in v0.0.2

func NewFinderConfig() FinderConfig

type FormatHint

type FormatHint int
const (
	String FormatHint = iota
	JSON
	YAML
	Jsonnet
)

func DetectFormat

func DetectFormat(path string) FormatHint

func (FormatHint) String

func (format FormatHint) String() string

type MergeStrategy

type MergeStrategy int
const (
	NoStrategy MergeStrategy = iota
	UniqueJoin
)

func (MergeStrategy) String

func (strategy MergeStrategy) String() string

type Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet[T comparable]() Set[T]

func (*Set[T]) GetSlice

func (s *Set[T]) GetSlice() []T

func (*Set[T]) Has

func (s *Set[T]) Has(item T) bool

func (*Set[T]) Insert

func (s *Set[T]) Insert(item T)

func (*Set[T]) IsEmpty

func (s *Set[T]) IsEmpty() bool

func (*Set[T]) Pop

func (s *Set[T]) Pop() (T, bool)

type TraverseDirection

type TraverseDirection int
const (
	None TraverseDirection = iota
	TowardsRoot
	TowardsChildren
)

type VisitableQueue

type VisitableQueue[T comparable] struct {
	// contains filtered or unexported fields
}

func NewVisitableQueue

func NewVisitableQueue[T comparable]() VisitableQueue[T]

func (*VisitableQueue[T]) Get

func (q *VisitableQueue[T]) Get() (T, bool)

func (*VisitableQueue[T]) Import

func (q *VisitableQueue[T]) Import(items []T)

func (*VisitableQueue[T]) IsEmpty

func (q *VisitableQueue[T]) IsEmpty() bool

func (*VisitableQueue[T]) Put

func (q *VisitableQueue[T]) Put(item T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL