Documentation
¶
Index ¶
- func DeleteMappingKey(mapping *yaml.Node, key string)
- func DocumentMapping(doc *yaml.Node) *yaml.Node
- func EmptyDocument() *yaml.Node
- func EnsureDocumentMapping(doc *yaml.Node) *yaml.Node
- func EnsureMappingValue(mapping *yaml.Node, key string) *yaml.Node
- func IntValue(node *yaml.Node) int
- func MappingValue(mapping *yaml.Node, key string) *yaml.Node
- func ScalarValue(node *yaml.Node) string
- func SetMappingValue(mapping *yaml.Node, key string, value *yaml.Node)
- func StringFieldValues(node *yaml.Node) []string
- func StringValues(node *yaml.Node) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteMappingKey ¶
DeleteMappingKey removes all entries for key from a YAML mapping node.
func DocumentMapping ¶
DocumentMapping returns the document's mapping root when present.
func EmptyDocument ¶
EmptyDocument returns a YAML document with an empty mapping root.
func EnsureDocumentMapping ¶
EnsureDocumentMapping ensures doc is a YAML document with a mapping root.
func EnsureMappingValue ¶
EnsureMappingValue ensures key exists as a mapping value below mapping.
func MappingValue ¶
MappingValue returns the value for key in a YAML mapping node.
func ScalarValue ¶
ScalarValue returns a trimmed scalar node value.
func SetMappingValue ¶
SetMappingValue replaces or appends key with value in a YAML mapping node.
func StringFieldValues ¶
StringFieldValues returns shell-like fields from scalar nodes and raw scalar values from sequence nodes. It is useful for Docker Compose command fields, which can be a block/scalar command string or an argv-style sequence.
func StringValues ¶
StringValues returns scalar values from a scalar or sequence node.
Types ¶
This section is empty.