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

better search tools

This commit is contained in:
Laura
2025-08-14 17:08:45 +02:00
parent 5d44980510
commit 0b51ee9dad
17 changed files with 335 additions and 102 deletions

View File

@@ -1,23 +1,17 @@
package main
import (
"encoding/json"
"os"
)
func dump(v any) {
func debug(format string, args ...any) {
if !Debug {
return
}
b, _ := json.MarshalIndent(v, "", "\t")
os.WriteFile("debug.json", b, 0644)
log.Debugf(format+"\n", args...)
}
func debug(v any) {
if !Debug {
func debugIf(cond bool, format string, args ...any) {
if !cond {
return
}
log.Debugf("%#v\n", v)
debug(format, args)
}