Load every setting from one table in internal/config (closes #320)
check / check (push) Canceled after 0s

Config.settings lists each setting once: its key, its environment variable
and the function that loads it. Most rows load through field, whose
arguments give the type, the default and the check. db_url and
cache_max_bytes keep their own load functions. Loading, the unknown-key
and unknown-variable checks and the names in error messages all read the
table. allowlist_hosts now loads through parseHostList.
isKnownConfigKey, envVarNames, strictLoader, validate,
validateAllowlistHostsValue and getStringSlice are gone, with the
getStringSlice tests. The key constants move to the tests, their only
users. README.md lists the settings one item each instead of in a table,
with shorter sentences above the list. A new test checks that this list
and configs/config.example.yml name exactly the keys of the table.

Model: opus-5-5
This commit was merged in pull request #337.
This commit is contained in:
2026-10-26 22:32:03 +01:00
parent b73bbde46e
commit 93b13d6638
7 changed files with 604 additions and 719 deletions
+343 -584
View File
File diff suppressed because it is too large Load Diff