From 8b875e43a513d582d788ef37fdaf1c8cdad0c146 Mon Sep 17 00:00:00 2001 From: Cluas Date: Wed, 28 Apr 2021 18:58:40 +0800 Subject: [PATCH] binding: ignore unexpected field (#879) --- transport/http/binding/proto.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/transport/http/binding/proto.go b/transport/http/binding/proto.go index 69d06a3dc..60bc3817e 100644 --- a/transport/http/binding/proto.go +++ b/transport/http/binding/proto.go @@ -4,7 +4,6 @@ import ( "encoding/base64" "errors" "fmt" - "log" "strconv" "strings" "time" @@ -51,7 +50,7 @@ func populateFieldValues(v protoreflect.Message, fieldPath []string, values []st if fd = fields.ByName(protoreflect.Name(fieldName)); fd == nil { fd = fields.ByJSONName(fieldName) if fd == nil { - log.Printf("field not found in %q: %q\n", v.Descriptor().FullName(), strings.Join(fieldPath, ".")) + // ignore unexpected field. return nil } }