initial commit
This commit is contained in:
15
utils/output_utils.go
Normal file
15
utils/output_utils.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func OutputJSON(data map[string][]string) {
|
||||
jsonstr, err := json.MarshalIndent(data, "", " ")
|
||||
if err != nil {
|
||||
fmt.Println("JSON encoding error:", err)
|
||||
return
|
||||
}
|
||||
fmt.Println(string(jsonstr))
|
||||
}
|
||||
Reference in New Issue
Block a user