From 749279836cf18d84ca658077ab08a180d2621590 Mon Sep 17 00:00:00 2001 From: Rob Shakir Date: Fri, 22 Apr 2022 10:16:04 -0700 Subject: [PATCH 1/2] Remove log that is always generated for annotation fields. * (M) ytypes/container.go - Since schemas that are generated with annotations will always generate the log that says that unmarshal into them is unsupported the log message produced is extremely low value to a user. To this end - just remove it. --- ytypes/container.go | 1 - 1 file changed, 1 deletion(-) diff --git a/ytypes/container.go b/ytypes/container.go index 73790f2ef..0d8b77dcb 100644 --- a/ytypes/container.go +++ b/ytypes/container.go @@ -158,7 +158,6 @@ func unmarshalStruct(schema *yang.Entry, parent interface{}, jsonTree map[string // Skip annotation fields since they do not have a schema. // TODO(robjs): Implement unmarshalling annotations. if util.IsYgotAnnotation(ft) { - log.Infof("ignoring annotation field %s during unmarshalling, unsupported", ft.Name) // We need to find the paths that we should have unmarshalled here to avoid // throwing errors to users whilst there is a TODO above. paths, err := pathTagFromField(ft) From 268b94de25704d2a8dfd43dec8a330c35db1ea36 Mon Sep 17 00:00:00 2001 From: Rob Shakir Date: Fri, 22 Apr 2022 10:21:38 -0700 Subject: [PATCH 2/2] Remove import of log library. --- ytypes/container.go | 1 - 1 file changed, 1 deletion(-) diff --git a/ytypes/container.go b/ytypes/container.go index 0d8b77dcb..2d9d50c3f 100644 --- a/ytypes/container.go +++ b/ytypes/container.go @@ -19,7 +19,6 @@ import ( "reflect" "strings" - log "github.com/golang/glog" "github.com/kylelemons/godebug/pretty" "github.com/openconfig/goyang/pkg/yang" "github.com/openconfig/ygot/util"