Documentation ¶
Overview ¶
Package yamlutils - Utilities to read yml files like if using xpath
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidChildTypeKeyValue = fmt.Errorf("invalid child type, must be 'key: value'")
ErrInvalidChildTypeKeyValue - The child type is invalid.
View Source
var ErrInvalidParentType = fmt.Errorf("invalid parent type, must be list or key/value")
ErrInvalidParentType - The parent type is invalid.
Logger - Custom lib logger
Functions ¶
func AddChildToTree ¶
Types ¶
type YML ¶
type YML struct {
Tree interface{}
}
YML object
func NewFromFile ¶
NewFromFile returns a list of pointers to a YML object from a file.
Returns a list since YAML files can contain multiple documents: https://yaml.org/spec/1.2-old/spec.html#id2800401
func NewFromReader ¶
NewFromReader returns a list of pointers to a YML object from an io.Reader.
Returns a list since YAML files can contain multiple documents: https://yaml.org/spec/1.2-old/spec.html#id2800401
func NewFromString ¶
NewFromString - returns a pointer to a YML object from a string.
Click to show internal directories.
Click to hide internal directories.