summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-08-11 22:35:17 +0300
committerPaul Buetow <paul@buetow.org>2024-08-11 22:35:17 +0300
commit36560e8aad76a8ea9edc5c10869a2b55a832d62c (patch)
tree1925f556360e0f50d9f3a76fa60c0190e1060eeb
parentad8ed5130c18a265e58c5d99d659206196260182 (diff)
fix
-rw-r--r--internal/config/config.go2
-rw-r--r--internal/config/server/server.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 12d40f0..e888e4f 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -26,7 +26,7 @@ func FromFile[T any](configFile string) (T, error) {
return conf, err
}
-// Set config from envoronment variable if present, e.g. hansWurst from GOS_HANS_WURST
+// Set config from environment variable if present, e.g. hansWurst from GOS_HANS_WURST
func EnvToStr(keys ...any) string {
for _, key := range keys {
switch key := key.(type) {
diff --git a/internal/config/server/server.go b/internal/config/server/server.go
index a123e81..6008ba9 100644
--- a/internal/config/server/server.go
+++ b/internal/config/server/server.go
@@ -29,6 +29,7 @@ func New(configFile string) (ServerConfig, error) {
conf.DataDir = config.EnvToStr("GOS_DATA_DIR", conf.DataDir, "data")
conf.EmailTo = config.EnvToStr("GOS_EMAIL_TO", conf.EmailTo)
conf.EmailFrom = config.EnvToStr("GOS_EMAIL_FROM", conf.EmailFrom)
+ conf.CRONMergeIntervalS = config.EnvToInt("GOS_CRON_MERGE_INTERVAL", conf.CRONMergeIntervalS, 3600)
conf.SMTPServer = config.EnvToStr("GOS_SMTP_SERVER", conf.SMTPServer, func() string {
hostname, err := os.Hostname()
@@ -38,7 +39,6 @@ func New(configFile string) (ServerConfig, error) {
return fmt.Sprintf("%s:25", hostname)
})
- conf.CRONMergeIntervalS = config.EnvToInt("GOS_CRON_MERGE_INTERVAL", 3600)
return conf, nil
}