refactor: consolidate debug flag and update gitignore

- Rename debugMode to isDebug for consistency across codebase
- Move debug flag check in ValidateTimeStamp to match other validations
- Add database.db to gitignore and remove unused config file
- Update README.md to clarify user registration rules
This commit is contained in:
2026-02-28 15:48:01 +08:00
parent ff62e3e755
commit b46f6dbfc2
8 changed files with 32 additions and 27 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import (
var (
loggerMutex sync.Mutex
debugMode bool
isDebug bool
)
const (
@@ -35,7 +35,7 @@ func getSystemTime() string {
func SetDebugMode(debug bool) {
loggerMutex.Lock()
defer loggerMutex.Unlock()
debugMode = debug
isDebug = debug
}
func PostLog(message string, level int) {
@@ -51,7 +51,7 @@ func PostLog(message string, level int) {
defer loggerMutex.Unlock()
// Skip DEBUG when debug is off
if idx == DEBUG && !debugMode {
if idx == DEBUG && !isDebug {
return
}