From 78c6f29b11b162841d510d8c183531dd41130203 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Fri, 24 Jun 2022 00:44:46 +0200 Subject: [PATCH] fix linter-reported errors --- provider/dev_provider.go | 4 ++-- provider/telegram.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/provider/dev_provider.go b/provider/dev_provider.go index 299cb48a..5c7cc2bc 100644 --- a/provider/dev_provider.go +++ b/provider/dev_provider.go @@ -35,7 +35,7 @@ type DevAuthServer struct { } // Run oauth2 dev server on port devAuthPort -func (d *DevAuthServer) Run(ctx context.Context) { // nolint (gocyclo) +func (d *DevAuthServer) Run(ctx context.Context) { //nolint (gocyclo) if d.Provider.Port == 0 { d.Provider.Port = defDevAuthPort } @@ -61,7 +61,7 @@ func (d *DevAuthServer) Run(ctx context.Context) { // nolint (gocyclo) // first time it will be called without username and will ask for one if !d.Automatic && (r.ParseForm() != nil || r.Form.Get("username") == "") { - formData := struct{ Query template.URL }{Query: template.URL(r.URL.RawQuery)} + formData := struct{ Query template.URL }{Query: template.URL(r.URL.RawQuery)} //nolint:gosec // query is safe if err = userFormTmpl.Execute(w, formData); err != nil { d.Logf("[WARN] can't write, %s", err) diff --git a/provider/telegram.go b/provider/telegram.go index 5a2bd459..f4ee0ecd 100644 --- a/provider/telegram.go +++ b/provider/telegram.go @@ -309,7 +309,7 @@ func (th *TelegramHandler) LoginHandler(w http.ResponseWriter, r *http.Request) ExpiresAt: time.Now().Add(30 * time.Minute).Unix(), NotBefore: time.Now().Add(-1 * time.Minute).Unix(), }, - SessionOnly: false, // TODO + SessionOnly: false, // TODO review? } if _, err := th.TokenService.Set(w, claims); err != nil {