From 3934d75ac516a530ceb9f494f7ce0de12cb1b5de Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 28 Nov 2022 15:04:47 +0100 Subject: Lint: Use gocritic linter and fix errors returned by it --- cmd/cli/main.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'cmd/cli') diff --git a/cmd/cli/main.go b/cmd/cli/main.go index b1bcaa9..ab0b408 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -162,15 +162,14 @@ func main() { customURLString := *customURLArg urlString := *urlArg secureInternetString := *secureInternet - if customURLString != "" { + switch { + case customURLString != "": printConfig(customURLString, ServerTypeCustom) - return - } else if urlString != "" { + case urlString != "": printConfig(urlString, ServerTypeInstituteAccess) - return - } else if secureInternetString != "" { + case secureInternetString != "": printConfig(secureInternetString, ServerTypeSecureInternet) - return + default: + flag.PrintDefaults() } - flag.PrintDefaults() } -- cgit v1.2.3