feat: added modules

This commit is contained in:
Marvin Zhang
2024-06-14 15:42:50 +08:00
parent f1833fed21
commit 0b67fd9ece
626 changed files with 60104 additions and 0 deletions

18
core/utils/debug.go Normal file
View File

@@ -0,0 +1,18 @@
package utils
import (
"fmt"
"github.com/spf13/viper"
"time"
)
func IsDebug() bool {
return viper.GetBool("debug")
}
func LogDebug(msg string) {
if !IsDebug() {
return
}
fmt.Println(fmt.Sprintf("[DEBUG] %s: %s", time.Now().Format("2006-01-02 15:04:05"), msg))
}