Ronald b64674623e
Copyright headers for missing files/folders (#16708)
* copyright headers for agent folder
2023-03-28 18:48:58 -04:00

16 lines
304 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package utils
import "encoding/json"
// Dump pretty prints the provided arg as json.
func Dump(v any) string {
b, err := json.MarshalIndent(v, "", " ")
if err != nil {
return "<ERR: " + err.Error() + ">"
}
return string(b)
}