about summary refs log tree commit diff stats
path: root/internal/config/config.go
diff options
context:
space:
mode:
authorAlan Pearce2024-04-18 17:25:56 +0200
committerAlan Pearce2024-04-18 17:47:17 +0200
commit6b2d980df841068bca3fe88f2e39091858491edf (patch)
tree05f20d4050a28238a146ec7b0a5ec789e16f4d05 /internal/config/config.go
parent477c7bf60099cf33984894744846a278fc884786 (diff)
downloadwebsite-6b2d980df841068bca3fe88f2e39091858491edf.tar.lz
website-6b2d980df841068bca3fe88f2e39091858491edf.tar.zst
website-6b2d980df841068bca3fe88f2e39091858491edf.zip
disable fiber startup message in production
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 96f721e..ebd3cfb 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -36,6 +36,7 @@ type Config struct {
 	BaseURL                URL    `toml:"base_url"`
 	RedirectOtherHostnames bool   `toml:"redirect_other_hostnames"`
 	Port                   uint64
+	Production             bool
 	Title                  string
 	Email                  string
 	Description            string
@@ -85,7 +86,8 @@ func GetConfig() (*Config, error) {
 		return nil, err
 	}
 	config.Port = port
-	if os.Getenv("ENV") != "production" {
+	config.Production = os.Getenv("ENV") == "production"
+	if !config.Production {
 		err = setDevelopmentOverrides(&config)
 		if err != nil {
 			return nil, errors.WithMessage(err, "could not override configuration")