fix config issue oops
This commit is contained in:
parent
626540e728
commit
8e4f353be1
2 changed files with 27 additions and 25 deletions
11
main.go
11
main.go
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue