config init now leaves out the test sources unless given --all

A section tagged init:"hidden" isn't written to the file config init
generates; fts_mock and sleeper are. config init --all writes them too.
They still load, and the config commands read and set them as before.
This commit is contained in:
bwilliams committed 2026-10-21 16:22:45 +01:00
1 parent f467c6c7da
commit b0f93fd437
8 files changed
+131 -21

No files matched your search

+4 -2
View File
@@ -13,15 +13,17 @@ const JSCKSources string = "sources"
// JSCSources configures each source of opportunities, one field
// per source. Each field's cfg tag must match the section's JSCK* constant.
// The test sources (FTSMock and Sleeper) are tagged init:"hidden", so
// `config init` only writes them with --all.
// SkipRulesFile is the JSON file of rules that mark new opportunities
// Skipped (see internal/skiprules), read again when it changes; empty means
// none.
type JSCSources struct {
SkipRulesFile string `cfg:"skip_rules_file"`
FindATender JSCSourceFindATender `cfg:"find_a_tender"`
FTSMock JSCSourceFTSMock `cfg:"fts_mock"`
FTSMock JSCSourceFTSMock `cfg:"fts_mock" init:"hidden"`
EUSupply JSCSourceEUSupply `cfg:"eu_supply"`
Sleeper JSCSourceSleeper `cfg:"sleeper"`
Sleeper JSCSourceSleeper `cfg:"sleeper" init:"hidden"`
}
// ---------- Section methods (see Section) ----------