mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-24 02:10:31 -05:00
16 lines
253 B
Go
16 lines
253 B
Go
package logutil
|
|
|
|
import "fmt"
|
|
|
|
type Fields map[string]interface{}
|
|
|
|
func (f Fields) String() string {
|
|
var s string
|
|
for k, v := range f {
|
|
if sv, ok := v.(string); ok {
|
|
v = fmt.Sprintf("%q", sv)
|
|
}
|
|
s += fmt.Sprintf(" %s=%v", k, v)
|
|
}
|
|
return s
|
|
}
|