config: Properly use yaml template
This commit is contained in:
parent
945329a080
commit
30c25b8e2a
9 changed files with 168 additions and 78 deletions
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue