diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 14:09:28 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 14:12:48 +0100 |
| commit | 59e6ccd051452162fab852a25deb4f0f8a9e22b2 (patch) | |
| tree | f4d8168b5b696f0eae26dbfc0e6cae514cbe65e7 /client | |
| parent | 279c0de75629de5868c3ac1b3272a2850e6b62f7 (diff) | |
Refactor: Fix revive linter errors by deleting redundant prefixes
Diffstat (limited to 'client')
| -rw-r--r-- | client/client.go | 2 | ||||
| -rw-r--r-- | client/client_test.go | 8 | ||||
| -rw-r--r-- | client/fsm.go | 8 | ||||
| -rw-r--r-- | client/server.go | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/client/client.go b/client/client.go index 3f8dbea..fda6f6a 100644 --- a/client/client.go +++ b/client/client.go @@ -16,7 +16,7 @@ import ( type ( // ServerBase is an alias to the internal ServerBase // This contains the details for each server. - ServerBase = server.ServerBase + ServerBase = server.Base ) // This wraps the error, logs it and then returns the wrapped error. diff --git a/client/client_test.go b/client/client_test.go index 9145ef3..fe2dec5 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -126,7 +126,7 @@ func testConnectOAuthParameter( t.Fatalf("No port with error: %v", portErr) } baseURL := fmt.Sprintf("http://127.0.0.1:%d/callback", port) - url, err := httpw.HTTPConstructURL(baseURL, parameters) + url, err := httpw.ConstructURL(baseURL, parameters) if err != nil { _ = state.CancelOAuth() t.Fatalf( @@ -170,9 +170,9 @@ func testConnectOAuthParameter( func TestConnectOAuthParameters(t *testing.T) { var ( - failedCallbackParameterError *oauth.OAuthCallbackParameterError - failedCallbackStateMatchError *oauth.OAuthCallbackStateMatchError - failedCallbackISSMatchError *oauth.OAuthCallbackISSMatchError + failedCallbackParameterError *oauth.CallbackParameterError + failedCallbackStateMatchError *oauth.CallbackStateMatchError + failedCallbackISSMatchError *oauth.CallbackISSMatchError ) diff --git a/client/fsm.go b/client/fsm.go index 2245630..88d71f2 100644 --- a/client/fsm.go +++ b/client/fsm.go @@ -10,10 +10,10 @@ import ( ) type ( - FSMStateID = fsm.FSMStateID - FSMStates = fsm.FSMStates - FSMState = fsm.FSMState - FSMTransition = fsm.FSMTransition + FSMStateID = fsm.StateID + FSMStates = fsm.States + FSMState = fsm.State + FSMTransition = fsm.Transition ) const ( diff --git a/client/server.go b/client/server.go index 5331a7d..a32b7df 100644 --- a/client/server.go +++ b/client/server.go @@ -48,7 +48,7 @@ func (client *Client) retryConfigAuth( errorMessage := "failed authorized config retry" config, configType, configErr := client.getConfigAuth(chosenServer, preferTCP) if configErr != nil { - var error *oauth.OAuthTokensInvalidError + var error *oauth.TokensInvalidError // Only retry if the error is that the tokens are invalid if errors.As(configErr, &error) { |
