yaml

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteNode

func DeleteNode(root *yaml.Node, path ...string) error

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

func GetNode(root *yaml.Node, path ...string) (*yaml.Node, bool, error)

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

func SetNode(root *yaml.Node, val yaml.Node, path ...string) error

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

func ValueInMapping(root *yaml.Node, key string) (*yaml.Node, error)

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.

Jump to

Keyboard shortcuts

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