diff options
author | Alan Pearce | 2024-04-21 21:55:23 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-21 21:55:23 +0200 |
commit | 1573550c7792a0403c2b4fa0959bd349c5f945df (patch) | |
tree | 19592c3f7b6ec438eac7a50adb174dfc987b10d6 /internal | |
parent | a10c8466b4bf81f9ddd356a2da90e8e5e9b360a5 (diff) | |
download | website-1573550c7792a0403c2b4fa0959bd349c5f945df.tar.lz website-1573550c7792a0403c2b4fa0959bd349c5f945df.tar.zst website-1573550c7792a0403c2b4fa0959bd349c5f945df.zip |
fix feed linking to localhost 🤦🏻
Diffstat (limited to 'internal')
-rw-r--r-- | internal/config/config.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index ebd3cfb..d2eabf0 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1,7 +1,6 @@ package config import ( - "fmt" "io/fs" "log/slog" "net/url" @@ -57,15 +56,6 @@ func getEnvFallback(key, fallback string) string { } } -func setDevelopmentOverrides(config *Config) error { - overrideURL, err := URL.Parse(config.BaseURL, "http://localhost:"+fmt.Sprint(config.Port)) - if err != nil { - return err - } - config.BaseURL.URL = overrideURL - return nil -} - func GetConfig() (*Config, error) { config := Config{} slog.Debug("reading config.toml") @@ -86,12 +76,5 @@ func GetConfig() (*Config, error) { return nil, err } config.Port = port - config.Production = os.Getenv("ENV") == "production" - if !config.Production { - err = setDevelopmentOverrides(&config) - if err != nil { - return nil, errors.WithMessage(err, "could not override configuration") - } - } return &config, nil } |