Skip to content

Commit 7b83690

Browse files
klauspostandersfylling
authored andcommitted
Add an example of a warning we would like to have printed.
1 parent a2017a0 commit 7b83690

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: inception/reflect.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323

2424
"bytes"
2525
"encoding/json"
26+
"log"
2627
"reflect"
2728
"unicode/utf8"
2829
)
@@ -272,6 +273,7 @@ func dominantField(fields []*StructField) (*StructField, bool) {
272273
if tagged >= 0 {
273274
// Multiple tagged fields at the same level: conflict.
274275
// Return no field.
276+
log.Printf("Warning: Duplicate tagged entry with entry %s found. Ignoring entries.", f.JsonName, f.Typ)
275277
return nil, false
276278
}
277279
tagged = i

0 commit comments

Comments
 (0)