refactor: replace via framework with chi + templ + datastar #2
@@ -4,6 +4,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
@@ -46,7 +47,9 @@ func getEnv(key, fallback string) string {
|
||||
}
|
||||
|
||||
func loadBase() *Config {
|
||||
godotenv.Load() //nolint:errcheck // .env file is optional
|
||||
if err := godotenv.Load(); err != nil {
|
||||
slog.Warn("no .env file found, using environment variables and defaults")
|
||||
}
|
||||
|
||||
return &Config{
|
||||
Host: getEnv("HOST", "0.0.0.0"),
|
||||
|
||||
Reference in New Issue
Block a user