github.com/blend/go-sdk@v1.20220411.3/logger/annotations.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  // CombineAnnotations combines one or many set of annotations.
    11  func CombineAnnotations(annotations ...Annotations) Annotations {
    12  	output := make(Annotations)
    13  	for _, set := range annotations {
    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  // Annotations are a collection of string name value pairs.
    25  type Annotations map[string]interface{}