From d429f3a7dbe8fc8cc43ebe565b6130b1cfce4ea1 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 20 Dec 2025 14:15:58 +0100 Subject: Add StartupConfiguration.Validate() This method makes it easy to validate a configuration. A call of it is now embedded into the StartupConfiguration.FromJSON() method which should always be the lowest level function to parse configurations. Thus configurations can usually be trusted. --- config_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config_test.go') diff --git a/config_test.go b/config_test.go index c568a34..0972d5d 100644 --- a/config_test.go +++ b/config_test.go @@ -11,4 +11,9 @@ func TestDefaultConfig(t *testing.T) { if err != nil { t.Fatalf("Failed parsing default config from JSON: %v", err) } + + err = config.Validate() + if err != nil { + t.Fatalf("Failed to validate default config: %v", err) + } } -- cgit v1.2.3-70-g09d2