v0.7.1 client readline removed for cross-platform compatibility with wasm, client logic fix fixes and refactor
This commit is contained in:
@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
// PrettyPrintJSON prints formatted JSON
|
||||
func PrettyPrintJSON(v interface{}) {
|
||||
func PrettyPrintJSON(v any) {
|
||||
data, err := json.MarshalIndent(v, "", " ")
|
||||
if err != nil {
|
||||
fmt.Printf("%sError formatting JSON: %s%s\n", Red, err.Error(), Reset)
|
||||
Print(Red, "Error formatting JSON: %s\n", err.Error())
|
||||
return
|
||||
}
|
||||
fmt.Println(string(data))
|
||||
|
||||
Reference in New Issue
Block a user