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

18 lines
220 B
Go
Raw Normal View History

2025-08-11 01:16:52 +02:00
package main
2025-08-14 17:08:45 +02:00
func debug(format string, args ...any) {
2025-08-11 01:16:52 +02:00
if !Debug {
return
}
2025-08-14 17:08:45 +02:00
log.Debugf(format+"\n", args...)
2025-08-11 01:16:52 +02:00
}
2025-08-14 17:08:45 +02:00
func debugIf(cond bool, format string, args ...any) {
if !cond {
2025-08-11 01:16:52 +02:00
return
}
2025-08-14 17:08:45 +02:00
debug(format, args)
2025-08-11 01:16:52 +02:00
}