Add database driver and config module

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2025-12-19 17:38:51 +08:00
parent e2345a8d4a
commit dc128c0392
11 changed files with 196 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package logger
import (
"nixcn-cms/config"
"os"
"time"
@@ -9,8 +10,8 @@ import (
)
func Init() {
FileLogger := false
DebugMode := true
FileLogger := config.Get("server.file_logger").(bool)
DebugMode := config.Get("server.debug_mode").(bool)
if FileLogger {
gin.DisableConsoleColor()