mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-04 10:58:29 +02:00
Fix lint
This commit is contained in:
@ -12,20 +12,24 @@ import (
|
|||||||
|
|
||||||
var debug bool
|
var debug bool
|
||||||
|
|
||||||
|
// IsDebug returns true if debug mode is enabled
|
||||||
func IsDebug() bool {
|
func IsDebug() bool {
|
||||||
return debug
|
return debug
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetDebug sets the debug mode
|
||||||
func SetDebug(on bool) {
|
func SetDebug(on bool) {
|
||||||
debug = on
|
debug = on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Printf prints debug information if debug mode is enabled
|
||||||
func Printf(info string, args ...any) {
|
func Printf(info string, args ...any) {
|
||||||
if debug {
|
if debug {
|
||||||
fmt.Printf("DEBUG: "+info+"\n", args...)
|
fmt.Printf("DEBUG: "+info+"\n", args...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CliFlag returns the CLI flag for debug mode
|
||||||
func CliFlag() cli.Flag {
|
func CliFlag() cli.Flag {
|
||||||
return &cli.BoolFlag{
|
return &cli.BoolFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
|
Reference in New Issue
Block a user