databricks-cli/libs/config/convert
Pieter Noordhuis f5f57b6bf9
Populate struct field with `config.Value` instance if possible (#1010)
## Changes

If a struct has a field of type `config.Value`, then we set it to the
source value while converting a `config.Value` instance to a struct as
part of a call to `convert.ToTyped`.

This is convenient when dealing with deeply nested structs where
functions on inner structs need access to the metadata provided by their
corresponding `config.Value` (e.g. where they were defined).

## Tests

Added unit tests pass.
2023-11-27 10:06:29 +00:00
..
end_to_end_test.go Function to convert Go struct back to `config.Value` (#935) 2023-11-15 09:19:51 +00:00
error.go Library to convert config.Value to Go struct (#904) 2023-10-24 11:12:36 +00:00
from_typed.go Function to convert Go struct back to `config.Value` (#935) 2023-11-15 09:19:51 +00:00
from_typed_test.go Function to convert Go struct back to `config.Value` (#935) 2023-11-15 09:19:51 +00:00
normalize.go Add configuration normalization code (#915) 2023-10-25 11:56:42 +00:00
normalize_test.go Add configuration normalization code (#915) 2023-10-25 11:56:42 +00:00
struct_info.go Populate struct field with `config.Value` instance if possible (#1010) 2023-11-27 10:06:29 +00:00
struct_info_test.go Populate struct field with `config.Value` instance if possible (#1010) 2023-11-27 10:06:29 +00:00
to_typed.go Populate struct field with `config.Value` instance if possible (#1010) 2023-11-27 10:06:29 +00:00
to_typed_test.go Populate struct field with `config.Value` instance if possible (#1010) 2023-11-27 10:06:29 +00:00