mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 13:41:30 +00:00
022caf39b4
CI failure on commit a2a59a8 (run #423):
internal/connector/issuer/googlecas/googlecas_failure_test.go:189:3:
QF1002: could use tagged switch on r.URL.Path (staticcheck)
The OAuth2 token-refresh test handler had two cases — `r.URL.Path ==
"/token"` and `default` — both equality-against-r.URL.Path. Stati-
ccheck's QF1002 rule wants this expressed as a tagged switch:
switch r.URL.Path {
case "/token":
...
default:
...
}
The other four switches in the same file are mixed equality + Contains
(`case r.URL.Path == "/token":` + `case strings.Contains(r.URL.Path,
"/certificates"):`) — those are not tag-able and stay on
`switch { case ... }`. Only the OAuth2 test handler had the single-
equality-case pattern QF1002 fires on.
Test-only commit. No production code change.
Verified locally:
- gofmt clean.
- go test -short -count=1 ./internal/connector/issuer/googlecas/...
green (5 failure tests + 14 happy-path subtests + 4 stub tests).