github.phpd.cn/hashicorp/packer@v1.3.2/builder/azure/common/logutil/logfields.go (about) 1 package logutil 2 3 import "fmt" 4 5 type Fields map[string]interface{} 6 7 func (f Fields) String() string { 8 var s string 9 for k, v := range f { 10 if sv, ok := v.(string); ok { 11 v = fmt.Sprintf("%q", sv) 12 } 13 s += fmt.Sprintf(" %s=%v", k, v) 14 } 15 return s 16 }