mirror of
https://github.com/status-im/consul.git
synced 2025-01-25 21:19:12 +00:00
d59efd390c
- 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
13 lines
234 B
Go
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)
|
|
}
|