Skip to content

Commit

Permalink
Add an example of a warning we would like to have printed.
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost authored and andersfylling committed Mar 21, 2019
1 parent a2017a0 commit 7b83690
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inception/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"bytes"
"encoding/json"
"log"
"reflect"
"unicode/utf8"
)
Expand Down Expand Up @@ -272,6 +273,7 @@ func dominantField(fields []*StructField) (*StructField, bool) {
if tagged >= 0 {
// Multiple tagged fields at the same level: conflict.
// Return no field.
log.Printf("Warning: Duplicate tagged entry with entry %s found. Ignoring entries.", f.JsonName, f.Typ)
return nil, false
}
tagged = i
Expand Down

0 comments on commit 7b83690

Please sign in to comment.