chore: 简化代码

This commit is contained in:
Liam Chan 2024-08-23 15:12:34 +08:00
parent fcce8f78b0
commit d4bc25fa59

View File

@ -19,8 +19,7 @@ func main() {
/**
* Logging
*/
date := time.Now().Format("2006-01-02")
logFile := fmt.Sprintf("%s.log", date)
logFile := fmt.Sprintf("%s.log", time.Now().Format("2006-01-02"))
var logFilePath string
if runtime.GOOS == "linux" {
logFilePath = fmt.Sprintf("/var/log/%s/%s", constant.AppName, logFile)