mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Rename UpdateYaml to UpdateYamlValue
We are going to add other ways to update yaml documents in the future.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user