summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 14:30:55 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 14:30:55 +0100
commitbb760ad9036b586fd4f07b96623e8421e1dccaf0 (patch)
treec06fa76d5fe89dadb3e7ad6d4f2c1d5fe6f94912 /client
parent0bfb35520d7e138e6219e550187e0b55bc8a29ac (diff)
Formatting: Run golines
Diffstat (limited to 'client')
-rw-r--r--client/client_test.go13
-rw-r--r--client/fsm.go9
2 files changed, 17 insertions, 5 deletions
diff --git a/client/client_test.go b/client/client_test.go
index 1b9a488..23e97ca 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -187,9 +187,15 @@ func TestConnectOAuthParameters(t *testing.T) {
// missing state
{&failedCallbackParameterError, httpw.URLParameters{"iss": iss, "code": "42"}},
// invalid state
- {&failedCallbackStateMatchError, httpw.URLParameters{"iss": iss, "code": "42", "state": "21"}},
+ {
+ &failedCallbackStateMatchError,
+ httpw.URLParameters{"iss": iss, "code": "42", "state": "21"},
+ },
// invalid iss
- {&failedCallbackISSMatchError, httpw.URLParameters{"iss": "37", "code": "42", "state": "21"}},
+ {
+ &failedCallbackISSMatchError,
+ httpw.URLParameters{"iss": "37", "code": "42", "state": "21"},
+ },
}
for _, test := range tests {
@@ -377,7 +383,8 @@ func TestPreferTCP(t *testing.T) {
t.Fatalf("Config error: %v", configErr)
}
- if configType == "openvpn" && !strings.HasSuffix(config, "remote eduvpnserver 1194 udp\nremote eduvpnserver 1194 tcp") {
+ if configType == "openvpn" &&
+ !strings.HasSuffix(config, "remote eduvpnserver 1194 udp\nremote eduvpnserver 1194 tcp") {
t.Fatalf("Suffix for disable prefer TCP is not in the right order for config: %s", config)
}
}
diff --git a/client/fsm.go b/client/fsm.go
index 79d0f62..0effb2a 100644
--- a/client/fsm.go
+++ b/client/fsm.go
@@ -109,7 +109,10 @@ func newFSM(
{To: StateNoServer, Description: "Reload list"},
{To: StateLoadingServer, Description: "User clicks a server in the UI"},
{To: StateChosenServer, Description: "The server has been chosen"},
- {To: StateSearchServer, Description: "The user is trying to choose a new server in the UI"},
+ {
+ To: StateSearchServer,
+ Description: "The user is trying to choose a new server in the UI",
+ },
{To: StateConnected, Description: "The user is already connected"},
{To: StateAskLocation, Description: "Change the location in the main screen"},
},
@@ -193,7 +196,9 @@ func newFSM(
},
},
StateConnected: FSMState{
- Transitions: []FSMTransition{{To: StateDisconnecting, Description: "App wants to disconnect"}},
+ Transitions: []FSMTransition{
+ {To: StateDisconnecting, Description: "App wants to disconnect"},
+ },
},
}
returnedFSM := fsm.FSM{}