mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-08 17:06:42 +00:00
initial commit
This commit is contained in:
18
env.go
Normal file
18
env.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
var OpenRouterToken string
|
||||
|
||||
func init() {
|
||||
log.MustPanic(godotenv.Load())
|
||||
|
||||
if OpenRouterToken = os.Getenv("OPENROUTER_TOKEN"); OpenRouterToken == "" {
|
||||
log.Panic(errors.New("missing openrouter token"))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user