simplification and refactorings

This commit is contained in:
Michael Engelhardt
2020-11-21 03:42:42 +01:00
parent f9706a98ed
commit 5f10a92c36
5 changed files with 88 additions and 48 deletions

View File

@ -146,7 +146,7 @@ func parseAndValidateConfigBytes(yamlBytes []byte) (config *Config, err error) {
func validateWebConfig(config *Config) {
if config.Web == nil {
config.Web = &webConfig{Address: DefaultAddress, Port: DefaultPort}
config.Web = &webConfig{Address: DefaultAddress, Port: DefaultPort, ContextRoot: DefaultContextRoot}
} else {
config.Web.validateAndSetDefaults()
}