Skip to content

Commit

Permalink
fix linter-reported errors
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal committed Jun 23, 2022
1 parent 74d6e7d commit 78c6f29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions provider/dev_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion provider/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 78c6f29

Please sign in to comment.