refactor: make core.domain required
This commit is contained in:
parent
89935f2f00
commit
7fd30e571c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue