From 4a27b529bb91d53ef3477ec06ee4cd787a4551c4 Mon Sep 17 00:00:00 2001 From: klauspost Date: Wed, 25 Feb 2015 16:41:43 +0100 Subject: [PATCH] Add an example of a warning we would like to have printed. --- inception/reflect.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inception/reflect.go b/inception/reflect.go index 8fb0bd5..2c9bb45 100644 --- a/inception/reflect.go +++ b/inception/reflect.go @@ -23,6 +23,7 @@ import ( "bytes" "encoding/json" + "log" "reflect" "unicode/utf8" ) @@ -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