mirror of https://github.com/databricks/cli.git
ff6e0354b9
## Changes This change adds the following functions: * `dyn.Get(value, "foo.bar") -> (dyn.Value, error)` * `dyn.Set(value, "foo.bar", newValue) -> (dyn.Value, error)` * `dyn.Map(value, "foo.bar", func) -> (dyn.Value, error)` And equivalent functions that take a previously constructed `dyn.Path`: * `dyn.GetByPath(value, dyn.Path) -> (dyn.Value, error)` * `dyn.SetByPath(value, dyn.Path, newValue) -> (dyn.Value, error)` * `dyn.MapByPath(value, dyn.Path, func) -> (dyn.Value, error)` Changes made by the "set" and "map" functions are never reflected in the input argument; they return new `dyn.Value` instances for all nodes in the path leading up to the changed value. ## Tests New unit tests cover all critical paths. |
||
---|---|---|
.. | ||
convert | ||
merge | ||
yamlloader | ||
yamlsaver | ||
kind.go | ||
kind_test.go | ||
location.go | ||
location_test.go | ||
path.go | ||
path_string.go | ||
path_string_test.go | ||
path_test.go | ||
value.go | ||
value_test.go | ||
value_underlying.go | ||
value_underlying_test.go | ||
visit.go | ||
visit_get.go | ||
visit_get_test.go | ||
visit_map.go | ||
visit_map_test.go | ||
visit_set.go | ||
visit_set_test.go | ||
walk.go | ||
walk_test.go |