Unmarshal function for custom values? #1607
Unanswered
JamesColeman-LW
asked this question in
Q&A
Replies: 1 comment
-
It does: 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
-
There are sometimes when I want to design a custom value, such as using an iota, and in doing so I want to build a custom unmarshal function. YAML has
MarshalYAML
andUnmarshalYAML
, and JSON hasMarshalJSON
andUnmarshalJSON
which allows me to customize how data in a format is decoded. Does viper have something similar?Beta Was this translation helpful? Give feedback.
All reactions