diff options
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 16 | ||||
| -rw-r--r-- | internal/config/config.toml | 4 | ||||
| -rw-r--r-- | internal/config/config_test.go | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 5102d38..bee48a7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -24,11 +24,11 @@ var seedTOML []byte // Version is lectio's release version, shared by every binary's // -v/--version output (lectio, lectio-ui, lectio-web). -const Version = "0.3.0" +const Version = "0.4.0" // validVersions are the five scripture versions lectio understands. var validVersions = map[string]bool{ - "pl": true, + "bt": true, "wuj": true, "vul": true, "grb": true, @@ -36,7 +36,7 @@ var validVersions = map[string]bool{ } // ValidVersion reports whether v is one of the five scripture versions -// lectio understands (pl, wuj, vul, grb, drb). +// lectio understands (bt, wuj, vul, grb, drb). func ValidVersion(v string) bool { return validVersions[v] } @@ -129,8 +129,8 @@ func Default() Config { SchemaVersion: 1, Lectionary: "new", TraditionalLang: "pl", - Versions: []string{"pl", "wuj", "vul", "grb", "drb"}, - DefaultVersion: "pl", + Versions: []string{"bt", "wuj", "vul", "grb", "drb"}, + DefaultVersion: "bt", Width: 0, All: false, Offline: false, @@ -227,15 +227,15 @@ func validate(cfg Config) error { } for _, v := range cfg.Versions { if !validVersions[v] { - return fmt.Errorf("config: invalid version %q in versions (must be one of pl, wuj, vul, grb, drb)", v) + return fmt.Errorf("config: invalid version %q in versions (must be one of bt, wuj, vul, grb, drb)", v) } } if !validVersions[cfg.DefaultVersion] { - return fmt.Errorf("config: invalid default_version %q (must be one of pl, wuj, vul, grb, drb)", cfg.DefaultVersion) + return fmt.Errorf("config: invalid default_version %q (must be one of bt, wuj, vul, grb, drb)", cfg.DefaultVersion) } for _, v := range cfg.WebVersions { if !validVersions[v] { - return fmt.Errorf("config: invalid version %q in web_versions (must be one of pl, wuj, vul, grb, drb)", v) + return fmt.Errorf("config: invalid version %q in web_versions (must be one of bt, wuj, vul, grb, drb)", v) } } return nil diff --git a/internal/config/config.toml b/internal/config/config.toml index 49cca7f..656ddc5 100644 --- a/internal/config/config.toml +++ b/internal/config/config.toml @@ -1,8 +1,8 @@ schema_version = 1 lectionary = "new" # "new" (niedziela.pl) or "traditional" (missalemeum, 1962) traditional_lang = "pl" # vernacular for traditional propers: "pl" or "en" -versions = ["pl", "wuj", "vul", "grb", "drb"] # compare set + TUI cycle order -default_version = "pl" # TUI start / `lectio show` default +versions = ["bt", "wuj", "vul", "grb", "drb"] # compare set + TUI cycle order +default_version = "bt" # TUI start / `lectio show` default width = 0 # CLI wrap width; 0 = detect terminal all = false # default to all parts (true) or just the gospel (false) offline = false # true = never fetch; read only harvested sigla + cache diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 0f7bea8..a72383b 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -13,7 +13,7 @@ func TestLoadSeeds(t *testing.T) { if err != nil { t.Fatal(err) } - if cfg.DefaultVersion != "pl" || cfg.Offline { + if cfg.DefaultVersion != "bt" || cfg.Offline { t.Errorf("defaults wrong: %+v", cfg) } if cfg.Lectionary != "new" { |
