1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-09 17:29:54 +00:00
Files
whiskr/debug.go

24 lines
247 B
Go
Raw Normal View History

2025-08-11 01:16:52 +02:00
package main
import (
"encoding/json"
"os"
)
func dump(v any) {
if !Debug {
return
}
b, _ := json.MarshalIndent(v, "", "\t")
os.WriteFile("debug.json", b, 0644)
}
func debug(v any) {
if !Debug {
return
}
log.Debugf("%#v\n", v)
}