Skip to content

Add an example of a warning we would like to have printed. #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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