yamlquery

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Describe

func Describe(node *yaml.Node) string

Describe returns a node as a YAML string.

func QueryNode

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

QueryNode accepts a node and period-delimited path of segments, searches the list to get a matching node. If a segment matches a list, the next seqment will be treated as an index. If a segment matches a map, the next segment will be treated as the key.

func QueryString

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

QueryString accepts a node and period-delimited path of segments, searches the list to get a matching node's string value. If a segment matches a list, the next seqment will be treated as an index. If a segment matches a map, the next segment will be treated as the key.

func QueryStringArray

func QueryStringArray(node *yaml.Node) []string

QueryStringArray returns the node's content as an array of strings if the node is a list. Otherwise returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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