fix config issue oops

This commit is contained in:
ari melody 2026-07-24 04:08:40 +01:00
parent 626540e728
commit 8e4f353be1
Signed by: ari
GPG key ID: 60B5F0386E3DDB7E
2 changed files with 27 additions and 25 deletions

11
main.go
View file

@ -13,7 +13,6 @@ import (
"codeberg.org/arimelody/ari-stream-tools/learning"
"codeberg.org/arimelody/ari-stream-tools/music"
"codeberg.org/arimelody/ari-stream-tools/twitch"
"codeberg.org/arimelody/ari-stream-tools/utils/dotenv"
"github.com/gin-gonic/gin"
)
@ -25,13 +24,6 @@ func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()
envars, err := dotenv.LoadEnv()
if err != nil {
if !os.IsNotExist(err) {
log.Fatalf("Failed to read .env: %v", err)
}
}
gin.SetMode(gin.ReleaseMode)
host := DEFAULT_HOST
@ -54,9 +46,6 @@ func main() {
musicService := music.New(ctx)
twitchService, err := twitch.New(ctx, twitch.ServiceOptions{
Port: port,
ChannelName: dotenv.SafeGet(envars, "TWITCH_CHANNEL_NAME"),
ClientID: dotenv.SafeGet(envars, "TWITCH_CLIENT_ID"),
ClientSecret: dotenv.SafeGet(envars, "TWITCH_CLIENT_SECRET"),
})
if err != nil {
log.Fatalf("Failed to create Twitch service: %v", err)