aboutsummaryrefslogtreecommitdiff
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index ebe687f..e501cf8 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -65,6 +65,7 @@ type Config struct {
WebPort int `toml:"web_port"`
WebDisplay string `toml:"web_display"`
WebMono bool `toml:"web_mono"`
+ WebVersions []string `toml:"web_versions"`
Parts map[string]map[string]bool `toml:"parts"`
}
@@ -94,6 +95,7 @@ func Default() Config {
WebPort: 0,
WebDisplay: "horizontal",
WebMono: false,
+ WebVersions: nil,
Parts: nil,
}
}
@@ -185,5 +187,10 @@ func validate(cfg Config) error {
if !validVersions[cfg.DefaultVersion] {
return fmt.Errorf("config: invalid default_version %q (must be one of pl, 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 nil
}