From 649c95a3fabb3bb8f3230655995697d424eb30dc Mon Sep 17 00:00:00 2001 From: Wenbin Zhang Date: Wed, 31 Oct 2018 23:25:49 -0700 Subject: [PATCH] Improve documentation of Unmarshaling --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 87bbc8b..ff1368a 100644 --- a/README.md +++ b/README.md @@ -606,12 +606,14 @@ type config struct { var C config -err := Unmarshal(&C) +err := viper.Unmarshal(&C) if err != nil { t.Fatalf("unable to decode into struct, %v", err) } ``` +`mapstructure` is the only supported tag. + ### Marshalling to string You may need to marhsal all the settings held in viper into a string rather than write them to a file.