yaml_utils

package
v0.0.0-...-00ab8b8 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenameYamlKey

func RenameYamlKey(yamlBytes []byte, path []string, newKey string) ([]byte, error)

takes a yaml document in bytes, a path to a key, and a new name for the key. Will rename the key to the new name if it exists, and do nothing otherwise.

func UpdateYamlValue

func UpdateYamlValue(yamlBytes []byte, path []string, value string) ([]byte, error)

takes a yaml document in bytes, a path to a key, and a value to set. The value must be a scalar.

Types

This section is empty.

Jump to

Keyboard shortcuts

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