From 8be555e5f91c6069c3d51cb014f1849fd182b1dc Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Thu, 24 Nov 2022 15:40:39 +0100 Subject: Style: Use stylecheck and fix errors --- cmd/cli/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd/cli') diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 96ca42f..ec78754 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -82,11 +82,11 @@ func stateCallback( newState client.FSMStateID, data interface{}, ) { - if newState == client.STATE_OAUTH_STARTED { + if newState == client.StateOAuthStarted { openBrowser(data) } - if newState == client.STATE_ASK_PROFILE { + if newState == client.StateAskProfile { sendProfile(state, data) } } @@ -153,17 +153,17 @@ func printConfig(url string, serverType ServerTypes) { // The main function // It parses the arguments and executes the correct functions func main() { - customUrlArg := flag.String("get-custom", "", "The url of a custom server to connect to") + customURLArg := flag.String("get-custom", "", "The url of a custom server to connect to") urlArg := flag.String("get-institute", "", "The url of an institute to connect to") secureInternet := flag.String("get-secure", "", "Gets secure internet servers") flag.Parse() // Connect to a VPN by getting an Institute Access config - customUrlString := *customUrlArg + customURLString := *customURLArg urlString := *urlArg secureInternetString := *secureInternet - if customUrlString != "" { - printConfig(customUrlString, ServerTypeCustom) + if customURLString != "" { + printConfig(customURLString, ServerTypeCustom) return } else if urlString != "" { printConfig(urlString, ServerTypeInstituteAccess) -- cgit v1.2.3