From 1149fc9f6e0c152754a0a673680c28086c367900 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 26 Aug 2025 12:02:26 -0700 Subject: [PATCH] Fix lint --- modules/debug/debug.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/debug/debug.go b/modules/debug/debug.go index 85dd572..5d54a6a 100644 --- a/modules/debug/debug.go +++ b/modules/debug/debug.go @@ -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",