mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-07 23:02:12 +02:00
commit
352d6c8d66
@ -16,13 +16,7 @@ func New(mds ...map[string]string) Metadata {
|
|||||||
md := Metadata{}
|
md := Metadata{}
|
||||||
for _, m := range mds {
|
for _, m := range mds {
|
||||||
for k, v := range m {
|
for k, v := range m {
|
||||||
if k == "" {
|
md.Set(k, v)
|
||||||
continue
|
|
||||||
}
|
|
||||||
key := strings.ToLower(k)
|
|
||||||
if len(v) > 0 && v != "" {
|
|
||||||
md[key] = v
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return md
|
return md
|
||||||
|
Loading…
Reference in New Issue
Block a user