We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 201e60b + c8058cc commit 8caaf87Copy full SHA for 8caaf87
pkg/analyzer/analyzer.go
@@ -24,6 +24,8 @@ const (
24
DefaultRPCPathFlag = "default-rpc-path"
25
)
26
27
+const statusCode = "StatusCode"
28
+
29
// New returns new usestdlibvars analyzer.
30
func New() *analysis.Analyzer {
31
return &analysis.Analyzer{
@@ -153,7 +155,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
153
155
return
154
156
}
157
- if basicLit := getBasicLitFromElts(n.Elts, "StatusCode"); basicLit != nil {
158
+ if basicLit := getBasicLitFromElts(n.Elts, statusCode); basicLit != nil {
159
checkHTTPStatusCode(pass, basicLit)
160
161
@@ -170,7 +172,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
170
172
171
173
174
- if selectorExpr.Sel.Name != "StatusCode" {
175
+ if selectorExpr.Sel.Name != statusCode {
176
177
178
0 commit comments