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:
+3
-3
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user