diff options
Diffstat (limited to 'utils.go')
| -rw-r--r-- | utils.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/utils.go b/utils.go new file mode 100644 index 0000000..b3aca0b --- /dev/null +++ b/utils.go @@ -0,0 +1,13 @@ +package flyscrape + +import ( + "encoding/json" + "os" +) + +func PrettyPrint(v any) { + enc := json.NewEncoder(os.Stdout) + enc.SetEscapeHTML(false) + enc.SetIndent("", " ") + enc.Encode(v) +} |