config: a bad number or true/false setting stops startup (closes #269) #274

Merged
clawbot merged 1 commits from fix/269-strict-config-values into next 2026-10-13 15:27:34 +02:00
1 Commits
Author SHA1 Message Date
clawbot 7ee78b384a config: a bad number or true/false setting stops startup (closes #269)
check / check (push) Waiting to run
PORT and DNSWATCHER_TLS_EXPIRY_WARNING were read with viper.GetInt,
and DNSWATCHER_DEBUG, DNSWATCHER_MAINTENANCE_MODE and
DNSWATCHER_SEND_TEST_NOTIFICATION with viper.GetBool, which turn a
value that does not parse into 0 or false with no error. Each is now
parsed the way parseInterval parses an interval: PORT must be 1 to
65535, the expiry warning 1 or more days, the true/false settings a
value strconv.ParseBool accepts. Anything else stops startup with an
error naming the variable and the value; empty still means the
default.

Reading the config file moved, unchanged, from buildConfig into
readConfigFile, so buildConfig stays within the linter's length limit.

Model: opus-5-5
2026-10-13 11:51:06 +00:00