Files
netmaker/cli/functions/pretty_print.go
2022-11-28 18:16:56 +05:30

16 lines
206 B
Go

package functions
import (
"encoding/json"
"fmt"
"log"
)
func PrettyPrint(data any) {
body, err := json.MarshalIndent(data, "", " ")
if err != nil {
log.Fatal(err)
}
fmt.Println(string(body))
}