Rename UpdateYaml to UpdateYamlValue

We are going to add other ways to update yaml documents in the future.
This commit is contained in:
Stefan Haller 2023-06-08 08:38:46 +02:00
parent bf685cf832
commit a14794bf5c
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@ import (
)
// takes a yaml document in bytes, a path to a key, and a value to set. The value must be a scalar.
func UpdateYaml(yamlBytes []byte, path []string, value string) ([]byte, error) {
func UpdateYamlValue(yamlBytes []byte, path []string, value string) ([]byte, error) {
// Parse the YAML file.
var node yaml.Node
err := yaml.Unmarshal(yamlBytes, &node)