summaryrefslogtreecommitdiff
path: root/internal/oauth
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-20 13:21:34 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-20 13:21:34 +0200
commit25d2143a627531fc0475d639c1e8f657ccafa630 (patch)
tree3b5b69b64f5f6879810842464056543e315c64a4 /internal/oauth
parentb0e4e454fc94935cf8ee3282a07596ec53268a18 (diff)
Golang-ci-lint: Fixes
Diffstat (limited to 'internal/oauth')
-rw-r--r--internal/oauth/oauth.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/oauth/oauth.go b/internal/oauth/oauth.go
index e99b715..d8acfad 100644
--- a/internal/oauth/oauth.go
+++ b/internal/oauth/oauth.go
@@ -200,9 +200,9 @@ func (oauth *OAuth) Callback(w http.ResponseWriter, req *http.Request) {
code, success := req.URL.Query()["code"]
// Shutdown after we're done
defer func() {
- if oauth.Session.Server != nil {
- go oauth.Session.Server.Shutdown(oauth.Session.Context)
- }
+ if oauth.Session.Server != nil {
+ go oauth.Session.Server.Shutdown(oauth.Session.Context) //nolint:errcheck
+ }
}()
if !success {
oauth.Session.CallbackError = &types.WrappedErrorMessage{
@@ -310,9 +310,9 @@ func (oauth *OAuth) Cancel() {
Message: "cancelled OAuth",
Err: &OAuthCancelledCallbackError{},
}
- if oauth.Session.Server != nil {
- oauth.Session.Server.Shutdown(oauth.Session.Context)
- }
+ if oauth.Session.Server != nil {
+ oauth.Session.Server.Shutdown(oauth.Session.Context) //nolint:errcheck
+ }
}
func (oauth *OAuth) EnsureTokens() error {
@@ -351,7 +351,7 @@ func (oauth *OAuth) EnsureTokens() error {
type OAuthCancelledCallbackError struct{}
func (e *OAuthCancelledCallbackError) Error() string {
- return fmt.Sprintf("client cancelled OAuth")
+ return "client cancelled OAuth"
}
type OAuthCallbackParameterError struct {