refactor: make core.domain required

This commit is contained in:
Derrick Hammer 2024-01-12 10:40:39 -05:00
parent 89935f2f00
commit 7fd30e571c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 10 additions and 2 deletions

View File

@ -98,8 +98,16 @@ func (p *PortalImpl) getInitFuncs() []func() error {
return nil return nil
}, },
func() error { func() error {
if !p.Config().IsSet("core.port") {
p.logger.Fatal("core.port is required") required := []string{
"core.domain",
"core.port",
}
for _, key := range required {
if !p.Config().IsSet(key) {
p.logger.Fatal(key + " is required")
}
} }
return nil return nil