From f8e59875f73660f72a6296a15e3a883e3fb7b8eb Mon Sep 17 00:00:00 2001 From: PCD-01 Date: Thu, 3 Nov 2022 21:53:04 +0800 Subject: [PATCH] Update factory.go --- service/factory.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/factory.go b/service/factory.go index 7c9aab1..d33eb60 100644 --- a/service/factory.go +++ b/service/factory.go @@ -65,7 +65,7 @@ func StartNewService(s *config.ConfigProxyService) { log.Panic(color.HiRedString("Service %s: ListTags can't be null when access control enabled.", s.Name)) } for _, tag := range s.IPAccess.ListTags { - if common.GetSecond[error](access.GetTargetList(tag)) != nil { + if err = common.GetSecond[error](access.GetTargetList(tag)); err != nil { log.Panic(color.HiRedString("Service %s: %s", s.Name, err.Error())) } } @@ -78,7 +78,7 @@ func StartNewService(s *config.ConfigProxyService) { log.Panic(color.HiRedString("Service %s: ListTags can't be null when access control enabled.", s.Name)) } for _, tag := range s.Minecraft.NameAccess.ListTags { - if common.GetSecond[error](access.GetTargetList(tag)) != nil { + if err = common.GetSecond[error](access.GetTargetList(tag)); err != nil { log.Panic(color.HiRedString("Service %s: %s", s.Name, err.Error())) } }