databricks-cli/libs/dyn/yamlloader
Pieter Noordhuis 0f4891f0fe
Add `dyn.Time` to box a timestamp with its original string value (#1732)
## Changes

If not explicitly quoted, the YAML loader interprets a value like
`2024-08-29` as a timestamp. Such a value is usually intended to be a
string instead. Our normalization logic was not able to turn a time
value back into the original string.

This change boxes the time value to include its original string
representation. Normalization of one of these values into a string can
now use the original input value.

## Tests

Unit tests in `libs/dyn/convert`.
2024-08-29 13:02:34 +00:00
..
testdata Rename libs/config -> libs/dyn (#1086) 2023-12-22 13:20:45 +00:00
loader.go Add `dyn.Time` to box a timestamp with its original string value (#1732) 2024-08-29 13:02:34 +00:00
yaml.go Return `dyn.InvalidValue` instead of `dyn.NilValue` when errors happen (#1514) 2024-06-21 14:22:42 +00:00
yaml_anchor_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
yaml_error_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
yaml_mix_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
yaml_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00