mirror of https://github.com/databricks/cli.git
26094f01a0
## Changes Before this change maps were stored as a regular Go map with string keys. This didn't let us capture metadata (location information) for map keys. To address this, this change replaces the use of the regular Go map with a dedicated type for a dynamic map. This type stores the `dyn.Value` for both the key and the value. It uses a map to still allow O(1) lookups and redirects those into a slice. ## Tests * All existing unit tests pass (some with minor modifications due to interface change). * Equality assertions with `assert.Equal` no longer worked because the new `dyn.Mapping` persists the order in which keys are set and is therefore susceptible to map ordering issues. To fix this, I added a `dynassert` package that forwards all assertions to `testify/assert` but intercepts equality for `dyn.Value` arguments. |
||
---|---|---|
.. | ||
convert | ||
dynassert | ||
dynvar | ||
merge | ||
yamlloader | ||
yamlsaver | ||
kind.go | ||
kind_test.go | ||
location.go | ||
location_test.go | ||
mapping.go | ||
mapping_test.go | ||
path.go | ||
path_string.go | ||
path_string_test.go | ||
path_test.go | ||
pattern.go | ||
pattern_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 |