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 I can set defaults in implementation of UnmarshalYAML interface for Connections struct, which will work for array of structs. So I am closing this issue.
Let's say I have a YAML like this
And a struct like this
And I want following code to set a default value for
Config.Connections[*].Ssl
:Right now it is not happening, probably because
Config.Connections
is not initialized before the Unmarshalling.The text was updated successfully, but these errors were encountered: