A missing .env file no longer causes a fatal error. Env vars can now come from the container environment (Docker/systemd) or a .env file interchangeably. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
345 B
Go
23 lines
345 B
Go
/*
|
|
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
|
|
*/
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/hculpan/areweplaying/cmd/cli/cmd"
|
|
"github.com/hculpan/areweplaying/pkg/utils"
|
|
"github.com/joho/godotenv"
|
|
)
|
|
|
|
func main() {
|
|
godotenv.Load()
|
|
|
|
logFile := os.Getenv("CLI_LOG_FILE")
|
|
if len(logFile) > 0 {
|
|
utils.SetLogFile(logFile)
|
|
}
|
|
|
|
cmd.Execute()
|
|
}
|