add debug print
This commit is contained in:
commit
84ac66270c
2 changed files with 15 additions and 0 deletions
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module git.merith.xyz/packages/go
|
||||||
|
|
||||||
|
go 1.18
|
12
utils/debugPrint.go
Normal file
12
utils/debugPrint.go
Normal 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...)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue