Documentation ¶
Index ¶
- func AddMap(n *yaml.Node, pp ...interface{}) (*yaml.Node, error)
- func AddSeq(n *yaml.Node, vv ...interface{}) (*yaml.Node, error)
- func CleanMap(n *yaml.Node) *yaml.Node
- func DecodeScalar(n *yaml.Node, name string, val interface{}) error
- func Each(n *yaml.Node, fn func(*yaml.Node, *yaml.Node) error) error
- func EachMap(n *yaml.Node, fn func(*yaml.Node, *yaml.Node) error) error
- func EachSeq(n *yaml.Node, fn func(*yaml.Node) error) error
- func FindKeyNode(n *yaml.Node, key string) *yaml.Node
- func IsKind(n *yaml.Node, tt ...yaml.Kind) bool
- func IsMapping(n *yaml.Node) bool
- func IsSeq(n *yaml.Node) bool
- func MakeMap(pp ...interface{}) (*yaml.Node, error)
- func MakeSeq(vv ...interface{}) (*yaml.Node, error)
- func NodeErr(n *yaml.Node, format string, aa ...interface{}) error
- func SeqToMap(ss *yaml.Node, k string) (*yaml.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMap ¶
func AddMap(n *yaml.Node, pp ...interface{}) (*yaml.Node, error)
AddMap adds a new item to the provided mapping node
pp is a set of k, v items; where k's lie at i, and v's lie at i+1. non-string values (required by YAML nodes) are processed further. eg.: ["k1", "v1", "k2", "v2"]
func AddSeq ¶
func AddSeq(n *yaml.Node, vv ...interface{}) (*yaml.Node, error)
AddSeq adds new items to the sequence node
func CleanMap ¶
func CleanMap(n *yaml.Node) *yaml.Node
CleanMap helper removes any empty k:v nodes from the mapping node
The value is empty when the tag is !!null OR when the value and the content are empty
func DecodeScalar ¶
Checks validity of ref node and sets the value to given arg ptr
func FindKeyNode ¶
func FindKeyNode(n *yaml.Node, key string) *yaml.Node
findKeyNode returns key node from mapping key value checked in lower case
func MakeMap ¶
func MakeMap(pp ...interface{}) (*yaml.Node, error)
MakeMap creates a new mapping node based on the provided k, v items
pp is a set of k, v items; where k's lie at i, and v's lie at i+1. non-string values (required by YAML nodes) are processed further. eg.: ["k1", "v1", "k2", "v2"]
Types ¶
This section is empty.