first comm

This commit is contained in:
2024-10-01 06:25:39 +08:00
commit d8b0c2f766
8 changed files with 285 additions and 0 deletions

22
service/config.go Normal file
View File

@ -0,0 +1,22 @@
package service
import (
"github.com/LiteyukiStudio/go-logger/log"
"github.com/joho/godotenv"
"os"
)
var (
Token = "server-status-be-q2dw9adh8"
)
func init() {
err := godotenv.Load(".env")
if err != nil {
log.Info("Error loading .env file")
}
token := os.Getenv("TOKEN")
if token != "" {
Token = token
}
}