style(metadata): specify map capacity hints (#2296)

pull/2248/head
icylight 2 years ago committed by GitHub
parent 6ca225b078
commit 5c3f0aa73e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      metadata/metadata.go

@ -46,7 +46,7 @@ func (m Metadata) Range(f func(k, v string) bool) {
// Clone returns a deep copy of Metadata // Clone returns a deep copy of Metadata
func (m Metadata) Clone() Metadata { func (m Metadata) Clone() Metadata {
md := Metadata{} md := make(Metadata, len(m))
for k, v := range m { for k, v := range m {
md[k] = v md[k] = v
} }

Loading…
Cancel
Save