Skip to content

Commit 253e74c

Browse files
author
zhangyu
committed
feat:增加mapstructure -> kmapstructure
1 parent e377188 commit 253e74c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/kmapstructure/mapstructure_examples_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ func ExampleDecode() {
1010
Age int
1111
Emails []string
1212
Extra map[string]string
13+
XInfo string `mapstructure:"x-info"`
1314
}
1415

1516
// This input can come from anywhere, but typically comes from
@@ -22,6 +23,7 @@ func ExampleDecode() {
2223
"extra": map[string]string{
2324
"twitter": "mitchellh",
2425
},
26+
"x-info": "asdasd",
2527
}
2628

2729
var result Person

0 commit comments

Comments
 (0)