You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to unmarshal a YAML configuration using the Config structure, the TestConfig field doesn't correctly map to the test_config key in the YAML. Instead, it seems to be defaulting to the struct field name (TestConfig).
Config struct
type Config struct {
TestConfig TestConfig `yaml:"test_config"`
}
Expected Behavior
The TestConfig field should map to the test_config key in the YAML.
Actual Behavior:
The TestConfig field maps to the TestConfig key in the YAML.
Steps to Reproduce:
Create a YAML file with the key test_config and some nested values.
Attempt to unmarshal this YAML into the Config struct.
Observe that the TestConfig field does not populate with the values from the test_config key in the YAML.
Description
When attempting to unmarshal a YAML configuration using the Config structure, the TestConfig field doesn't correctly map to the test_config key in the YAML. Instead, it seems to be defaulting to the struct field name (
TestConfig
).Config struct
Expected Behavior
The TestConfig field should map to the test_config key in the YAML.
Actual Behavior:
The TestConfig field maps to the TestConfig key in the YAML.
Steps to Reproduce:
🔗 zboto Link
The text was updated successfully, but these errors were encountered: