add debug print

This commit is contained in:
Merith-TK 2022-08-28 18:29:24 -07:00
commit 84ac66270c
2 changed files with 15 additions and 0 deletions

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module git.merith.xyz/packages/go
go 1.18

12
utils/debugPrint.go Normal file
View file

@ -0,0 +1,12 @@
package utils
import "log"
var DebugMode bool = false
// DebugPrint prints the given message to the log if the debug flag is set.
func DebugPrint(message ...any) {
if DebugMode {
log.Println(message...)
}
}