mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-09 17:29:54 +00:00
24 lines
247 B
Go
24 lines
247 B
Go
![]() |
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)
|
||
|
}
|