github.com/blend/go-sdk@v1.20220411.3/logger/labels.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package logger 9 10 // CombineLabels combines one or many set of fields. 11 func CombineLabels(labels ...Labels) Labels { 12 output := make(Labels) 13 for _, set := range labels { 14 if set == nil || len(set) == 0 { 15 continue 16 } 17 for key, value := range set { 18 output[key] = value 19 } 20 } 21 return output 22 } 23 24 // Labels are a collection of string name value pairs. 25 type Labels map[string]string