Replies: 1 comment
-
You could implement that by introducing a custom type using mapstructure. You can find some examples here: https://sagikazarmark.hu/blog/decoding-custom-formats-with-viper/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Does Viper support unmarshalling a Base64 string value into []byte? I mean like the
json/encoding
unmarshaller do.For example, if I have a struct:
type config struct { Salt []byte }
can Viper unmarshal a configuration likesalt: <base64-encoded-string>
directly into the Salt field?Beta Was this translation helpful? Give feedback.
All reactions