diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-04 15:29:11 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-04 15:29:11 +0200 |
| commit | 5dad968aa90ded83d57211426bc186f6d609ef06 (patch) | |
| tree | 1f072a2f5af07a64d88b85e04f0bc321d921c07a /cmd | |
| parent | b950e027b3553ccc767f88be8e88a1b3acf1b383 (diff) | |
State: Rename to client to avoid confusion with the FSM
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/cli/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 8bc083d..b221c71 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -34,7 +34,7 @@ func openBrowser(url interface{}) { } // Ask for a profile in the command line -func sendProfile(state *eduvpn.VPNState, data interface{}) { +func sendProfile(state *eduvpn.Client, data interface{}) { fmt.Printf("Multiple VPN profiles found. Please select a profile by entering e.g. 1") serverProfiles, ok := data.(*server.ServerProfileInfo) @@ -76,7 +76,7 @@ func sendProfile(state *eduvpn.VPNState, data interface{}) { // If we ask for a profile, we send the profile using command line input // Note that this has an additional argument, the vpn state which was wrapped into this callback function below func stateCallback( - state *eduvpn.VPNState, + state *eduvpn.Client, oldState eduvpn.FSMStateID, newState eduvpn.FSMStateID, data interface{}, @@ -91,7 +91,7 @@ func stateCallback( } // Get a config for Institute Access or Secure Internet Server -func getConfig(state *eduvpn.VPNState, url string, serverType ServerTypes) (string, string, error) { +func getConfig(state *eduvpn.Client, url string, serverType ServerTypes) (string, string, error) { if !strings.HasPrefix(url, "http") { url = "https://" + url } @@ -106,7 +106,7 @@ func getConfig(state *eduvpn.VPNState, url string, serverType ServerTypes) (stri // Get a config for a single server, Institute Access or Secure Internet func printConfig(url string, serverType ServerTypes) { - state := &eduvpn.VPNState{} + state := &eduvpn.Client{} registerErr := state.Register( "org.eduvpn.app.linux", |
