This website requires JavaScript.
Explore
Help
Sign In
steve
/
databricks-cli
mirror of
https://github.com/databricks/cli.git
Watch
1
Star
0
Fork
You've already forked databricks-cli
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
dd10eedb14
databricks-cli
/
libs
/
diag
/
severity.go
11 lines
97 B
Go
Raw
Normal View
History
Unescape
Escape
Add configuration normalization code (#915) ## Changes This is similar to #904 but instead of converting the dynamic configuration to Go structs, this normalizes a `config.Value` according to the type of a Go struct and returns the new, normalized `config.Value`. This will be used to ensure that two `config.Value` trees are type-compatible before we can merge them (i.e. instances from different files). Warnings and errors during normalization are accumulated and returned as a `diag.Diagnostics` structure. We can use this to surface warnings about unknown fields, or errors about invalid types, in aggregate instead of one-by-one. This approach is inspired by the pattern to accumulate diagnostics in Terraform provider code. ## Tests New unit tests.
2023-10-25 11:56:42 +00:00
package
diag
type
Severity
int
const
(
Error
Severity
=
iota
Warning
Info
fix failing tests
2024-09-26 15:14:43 +00:00
Recommendation
Add configuration normalization code (#915) ## Changes This is similar to #904 but instead of converting the dynamic configuration to Go structs, this normalizes a `config.Value` according to the type of a Go struct and returns the new, normalized `config.Value`. This will be used to ensure that two `config.Value` trees are type-compatible before we can merge them (i.e. instances from different files). Warnings and errors during normalization are accumulated and returned as a `diag.Diagnostics` structure. We can use this to surface warnings about unknown fields, or errors about invalid types, in aggregate instead of one-by-one. This approach is inspired by the pattern to accumulate diagnostics in Terraform provider code. ## Tests New unit tests.
2023-10-25 11:56:42 +00:00
)