From 8f55924c47559f5fa7c04667ad07e5419e19b7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=9C=9F?= <1046060018@qq.com> Date: Wed, 28 Jul 2021 14:03:05 +0800 Subject: [PATCH] optimize --- metadata/metadata.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 42db934a9..a9eaa8a38 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -16,13 +16,7 @@ func New(mds ...map[string]string) Metadata { md := Metadata{} for _, m := range mds { for k, v := range m { - if k == "" { - continue - } - key := strings.ToLower(k) - if v != "" { - md[key] = v - } + md.Set(k, v) } } return md