summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/eduvpn-cli/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/eduvpn-cli/main.go b/cmd/eduvpn-cli/main.go
index 2a990f2..2dd0c31 100644
--- a/cmd/eduvpn-cli/main.go
+++ b/cmd/eduvpn-cli/main.go
@@ -19,7 +19,7 @@ import (
)
// Open a browser with xdg-open.
-func openBrowser(data interface{}) {
+func openBrowser(data any) {
str, ok := data.(string)
if !ok {
return
@@ -33,7 +33,7 @@ func openBrowser(data interface{}) {
}()
}
-func getProfileInteractive(profiles *srvtypes.Profiles, data interface{}) (string, error) {
+func getProfileInteractive(profiles *srvtypes.Profiles, data any) (string, error) {
fmt.Printf("Multiple VPN profiles found. Please select a profile by entering e.g. 1")
ps := ""
var options []string
@@ -59,7 +59,7 @@ func getProfileInteractive(profiles *srvtypes.Profiles, data interface{}) (strin
return p, nil
}
-func sendProfile(profile string, data interface{}) {
+func sendProfile(profile string, data any) {
d, ok := data.(*srvtypes.RequiredAskTransition)
if !ok {
fmt.Fprintf(os.Stderr, "\ninvalid data type: %v\n", reflect.TypeOf(data))
@@ -89,7 +89,7 @@ func sendProfile(profile string, data interface{}) {
// If OAuth is started we open the browser with the Auth URL
// 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(_ client.FSMStateID, newState client.FSMStateID, data interface{}, prof string, dir string) {
+func stateCallback(_ client.FSMStateID, newState client.FSMStateID, data any, prof string, dir string) {
if newState == client.StateOAuthStarted {
openBrowser(data)
}
@@ -150,7 +150,7 @@ func printConfig(url string, cc string, srvType srvtypes.Type, prof string, debu
"org.eduvpn.app.linux",
fmt.Sprintf("%s-cli", version.Version),
dir,
- func(oldState client.FSMStateID, newState client.FSMStateID, data interface{}) bool {
+ func(oldState client.FSMStateID, newState client.FSMStateID, data any) bool {
stateCallback(oldState, newState, data, prof, dir)
return true
},