mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-08 17:06:42 +00:00
debug and sc update
This commit is contained in:
11
env.go
11
env.go
@@ -7,12 +7,21 @@ import (
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
var OpenRouterToken string
|
||||
var (
|
||||
Debug bool
|
||||
OpenRouterToken string
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.MustPanic(godotenv.Load())
|
||||
|
||||
Debug = os.Getenv("DEBUG") == "true"
|
||||
|
||||
if OpenRouterToken = os.Getenv("OPENROUTER_TOKEN"); OpenRouterToken == "" {
|
||||
log.Panic(errors.New("missing openrouter token"))
|
||||
}
|
||||
|
||||
if Debug {
|
||||
log.Debug("Debug mode enabled")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user