Documentation ¶
Index ¶
- func DeleteNode(root *yaml.Node, path ...string) error
- func GetNode(root *yaml.Node, path ...string) (*yaml.Node, bool, error)
- func SetNode(root *yaml.Node, val yaml.Node, path ...string) error
- func SetStyle(root *yaml.Node, style yaml.Style)
- func ToYAML(rawObj interface{}) (*yaml.Node, error)
- func ValueInMapping(root *yaml.Node, key string) (*yaml.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteNode ¶
DeleteNode deletes the node at the given path in the given tree of mapping nodes. It's a noop if the path doesn't exist.
func GetNode ¶
GetNode gets the node at the given path in the given sequence of mapping nodes, or, if it doesn't exist, returning false.
func SetNode ¶
SetNode sets the given path to the given yaml Node, creating mapping nodes along the way.
func SetStyle ¶
func SetStyle(root *yaml.Node, style yaml.Style)
SetStyle sets the style for all nodes in the given node tree to the given style.
func ToYAML ¶
func ToYAML(rawObj interface{}) (*yaml.Node, error)
ToYAML converts some object that serializes to JSON into a YAML node tree. It's useful since it pays attention to JSON tags, unlike yaml.Unmarshal or yaml.Node.Decode.
func ValueInMapping ¶
ValueInMapping finds the value node with the corresponding string key in the given mapping node. If the given node is not a mapping, an error will be returned.
Types ¶
This section is empty.