diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-24 15:40:39 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-24 15:40:39 +0100 |
| commit | 8be555e5f91c6069c3d51cb014f1849fd182b1dc (patch) | |
| tree | 9c78f2ee1f5122da1e1ed3e452682f7f6744778f /cmd/cli | |
| parent | 791fffebff4499e4fad3217e2160596e1b8b3eea (diff) | |
Style: Use stylecheck and fix errors
Diffstat (limited to 'cmd/cli')
| -rw-r--r-- | cmd/cli/main.go | 12 |
1 files changed, 6 insertions, 6 deletions
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) |
