refactor: add check to ensure core.port is set

This commit is contained in:
Derrick Hammer 2024-01-12 09:20:43 -05:00
parent 2caaa07da8
commit 1e3addac8b
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,12 @@ func (p *PortalImpl) getInitFuncs() []func() error {
return []func() error{ return []func() error{
func() error { func() error {
return config.Init(p.Logger()) return config.Init(p.Logger())
}, func() error {
if !p.Config().IsSet("core.port") {
p.logger.Fatal("core.port is required")
}
return nil
}, },
func() error { func() error {
var seed [32]byte var seed [32]byte