config: Properly use yaml template

This commit is contained in:
Tom Wiesing 2023-02-25 20:26:54 +01:00
parent 945329a080
commit 30c25b8e2a
No known key found for this signature in database
9 changed files with 168 additions and 78 deletions

View file

@ -21,7 +21,12 @@ func (config *Config) Unmarshal(env environment.Environment, src io.Reader) erro
}
}
// do the validator
// TODO: should this be done seperatly?
return config.Validate(env)
}
// Validate validates this configuration file and sets appropriate defaults
func (config *Config) Validate(env environment.Environment) error {
return validator.Validate(config, validators.New(env))
}