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
I realized that a SetValue() defined on a custom struct type is never called. Insted, the struct is flattened. This prevents me from parsing e.g., a yaml string from an ENV variable:
typeConfigstruct {
ComplexComplexYamlConfig`env:"COMPLEX_CONFIG"`
}
typeComplexYamlConfigstruct {
Leftstring`yaml:"myProp"`
}
func (c*ComplexYamlConfig) SetValue(sstring) error {
// will never be called by cleanenvreturnyaml.Unmarshal([]byte(s), c)
}
Is this something that can be added? Or is there a different way of achieving the same thing?
The text was updated successfully, but these errors were encountered:
I realized that a
SetValue()
defined on a custom struct type is never called. Insted, the struct is flattened. This prevents me from parsing e.g., a yaml string from an ENV variable:Is this something that can be added? Or is there a different way of achieving the same thing?
The text was updated successfully, but these errors were encountered: