Skip to content

Commit

Permalink
Add an example showing how to use a DecodeHookFunc to parse a custom …
Browse files Browse the repository at this point in the history
…field.
  • Loading branch information
carlohamalainen committed Dec 30, 2023
2 parents 08e6a8b + 94a275a commit 9945185
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapstructure_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func ExampleDecode_decodeHookFunc() {

// Example of parsing messy input: here we have latitude, longitude squashed into
// a single string field. We write a custom DecodeHookFunc to parse the '#' separated
/// values into a PersonLocation struct.
// values into a PersonLocation struct.
input := map[string]interface{}{
"name": "Mitchell",
"location": "-35.2809#149.1300",
Expand Down

0 comments on commit 9945185

Please sign in to comment.