summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 15:04:47 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 15:04:47 +0100
commit3934d75ac516a530ceb9f494f7ce0de12cb1b5de (patch)
tree23c905ad43340e3192362afaeec8b6f6731575a8 /cmd
parentf884b3df2762a1bd3799441e06659b9caad4ee6c (diff)
Lint: Use gocritic linter and fix errors returned by it
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cli/main.go13
1 files changed, 6 insertions, 7 deletions
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()
}