R.B. Boyer d59efd390c
test: general cleanup and fixes for the container integration test suite (#15959)
- remove dep on consul main module
- use 'consul tls' subcommands instead of tlsutil
- use direct json config construction instead of agent/config structs
- merge libcluster and libagent packages together
- more widely use BuildContext
- get the OSS/ENT runner stuff working properly
- reduce some flakiness
- fix some correctness related to http/https API
2023-01-11 15:34:27 -06:00

13 lines
234 B
Go

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)
}