all repos — homestead @ ee299b880a57822bae6b507c2ac62ec0a3dfbe02

Code for my website

fix feed linking to localhost 🤦🏻

Alan Pearce
commit

ee299b880a57822bae6b507c2ac62ec0a3dfbe02

parent

c3185fb5bb82c69afac910b5e69465b644a14bbf

1 file changed, 0 insertions(+), 17 deletions(-)

changed files
M internal/config/config.gointernal/config/config.go
@@ -1,7 +1,6 @@
package config import ( - "fmt" "io/fs" "log/slog" "net/url"
@@ -57,15 +56,6 @@ return fallback
} } -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 @@ if err != nil {
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 }