This commit is contained in:
Lunny Xiao
2025-08-26 12:02:26 -07:00
parent e3ecf9b94a
commit 1149fc9f6e

View File

@ -12,20 +12,24 @@ import (
var debug bool
// IsDebug returns true if debug mode is enabled
func IsDebug() bool {
return debug
}
// SetDebug sets the debug mode
func SetDebug(on bool) {
debug = on
}
// Printf prints debug information if debug mode is enabled
func Printf(info string, args ...any) {
if debug {
fmt.Printf("DEBUG: "+info+"\n", args...)
}
}
// CliFlag returns the CLI flag for debug mode
func CliFlag() cli.Flag {
return &cli.BoolFlag{
Name: "debug",