s11n

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMapValue

func GetMapValue(n *yaml.Node, key string) (*yaml.Node, *yaml.Node, error)

GetMapValue returns the key and value nodes from node that matches key. if node is not a mapping node or the key does not exist, GetMapValue returns nil

func GetPath

func GetPath(node *yaml.Node, path []interface{}) (*yaml.Node, error)

GetPath returns the node by descending into map and array nodes for each element of path

func MatchAll

func MatchAll(node *yaml.Node, path string) <-chan *yaml.Node

MatchAll returns all yaml nodes that match the provided path. The path is a `/`-separated string that describes a path into the template's tree. Wildcard elements (which can be map keys or array indices) are represented by a `*`. Matching an arbitrary number (including zero) of descendents can be done with `**`.

func MatchOne

func MatchOne(node *yaml.Node, path string) *yaml.Node

MatchOne returns the yaml node that matches the provided path. If zero or more than one node matches the provided path, MatchOne will return nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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