From 7fd30e571cb3bb10f29e89f02a55706c95422ffc Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 12 Jan 2024 10:40:39 -0500 Subject: [PATCH] refactor: make core.domain required --- cmd/portal/portal.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/portal/portal.go b/cmd/portal/portal.go index 92df7e5..a166e47 100644 --- a/cmd/portal/portal.go +++ b/cmd/portal/portal.go @@ -98,8 +98,16 @@ func (p *PortalImpl) getInitFuncs() []func() error { return nil }, 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