1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

chore: change nil slice to maked slice (#967)

Co-authored-by: Sycamor <zhangqiang@acnet.co>
This commit is contained in:
Sycamor 2021-05-28 21:05:17 +08:00 committed by GitHub
parent e7ddc1ba1e
commit 7f835db398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ func parseEndpoint(endpoints []string) (string, error) {
}
func parseAttributes(md map[string]string) *attributes.Attributes {
var pairs []interface{}
pairs := make([]interface{}, 0, len(md))
for k, v := range md {
pairs = append(pairs, k, v)
}