From 4819bf45ac90914f7fd905b17d05437cde55b5e7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 12 Jan 2024 09:27:45 -0500 Subject: [PATCH] refactor: move port check after identity init --- cmd/portal/portal.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cmd/portal/portal.go b/cmd/portal/portal.go index db02b03..92df7e5 100644 --- a/cmd/portal/portal.go +++ b/cmd/portal/portal.go @@ -74,12 +74,6 @@ func (p *PortalImpl) getInitFuncs() []func() error { return []func() error{ func() error { return config.Init(p.Logger()) - }, func() error { - if !p.Config().IsSet("core.port") { - p.logger.Fatal("core.port is required") - } - - return nil }, func() error { var seed [32]byte @@ -103,6 +97,13 @@ func (p *PortalImpl) getInitFuncs() []func() error { return nil }, + func() error { + if !p.Config().IsSet("core.port") { + p.logger.Fatal("core.port is required") + } + + return nil + }, func() error { return protocols.Init(p.protocolRegistry) },