mirror of
https://github.com/coder/coder.git
synced 2026-10-31 19:36:41 +08:00
refactor: upgrade golangci-lint to v2.0.2 (#28416)
This commit is contained in:
@@ -1258,7 +1258,7 @@ func (f *FakeIDP) httpHandler(t testing.TB) http.Handler {
|
||||
mux.Handle(revokeTokenPath, http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
|
||||
if f.revokeTokenGitHubFormat {
|
||||
u, p, ok := r.BasicAuth()
|
||||
if !ok || !(u == f.clientID && p == f.clientSecret) {
|
||||
if !ok || (u != f.clientID || p != f.clientSecret) {
|
||||
httpError(rw, http.StatusForbidden, xerrors.Errorf("basic auth failed"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -121,9 +121,10 @@ func parseSwaggerComment(commentGroup *ast.CommentGroup) SwaggerComment {
|
||||
r.model = args[2]
|
||||
}
|
||||
|
||||
if annotationName == "@Success" {
|
||||
switch annotationName {
|
||||
case "@Success":
|
||||
c.successes = append(c.successes, r)
|
||||
} else if annotationName == "@Failure" {
|
||||
case "@Failure":
|
||||
c.failures = append(c.failures, r)
|
||||
}
|
||||
case "@Param":
|
||||
|
||||
Reference in New Issue
Block a user