2023-10-13 14:37:41 +03:00

21 lines
248 B
Go

package log
import (
"fmt"
"os"
)
var IsDebug bool
func init() {
if os.Getenv("DEBUG") == "1" || os.Getenv("DEBUG") == "true" {
IsDebug = true
}
}
func Debug(a ...any) {
if IsDebug {
fmt.Println(append([]any{"[DEBUG]"}, a...)...)
}
}