From c89deaeca724c3bbecebdb8f0f47ff208630355f Mon Sep 17 00:00:00 2001 From: Mario Constanti Date: Thu, 22 Feb 2024 10:50:57 +0100 Subject: [PATCH] fix: ifElseChain linter finding Signed-off-by: Mario Constanti --- params/params.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/params/params.go b/params/params.go index 352bba89..36a254a1 100644 --- a/params/params.go +++ b/params/params.go @@ -286,11 +286,12 @@ func (p *Pool) RunnerTimeout() uint { } func (p *Pool) PoolType() PoolType { - if p.RepoID != "" { + switch { + case p.RepoID != "": return RepositoryPool - } else if p.OrgID != "" { + case p.OrgID != "": return OrganizationPool - } else if p.EnterpriseID != "" { + case p.EnterpriseID != "": return EnterprisePool } return ""