Skip to content

Commit 7b73505

Browse files
refactor: rename arg of typeElts
1 parent 895b470 commit 7b73505

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/analyzer/analyzer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ func run(pass *analysis.Pass) (interface{}, error) {
105105
return
106106
}
107107

108-
pkg, ok := typ.X.(*ast.Ident)
108+
x, ok := typ.X.(*ast.Ident)
109109
if !ok {
110110
return
111111
}
112112

113-
typeElts(pass, pkg, typ, n.Elts)
113+
typeElts(pass, x, typ, n.Elts)
114114

115115
case *ast.IfStmt:
116116
cond, ok := n.Cond.(*ast.BinaryExpr)
@@ -222,9 +222,9 @@ func funArgs(pass *analysis.Pass, x *ast.Ident, fun *ast.SelectorExpr, args []as
222222
}
223223
}
224224

225-
// typeElts checks elements of type from package
226-
func typeElts(pass *analysis.Pass, pkg *ast.Ident, typ *ast.SelectorExpr, elts []ast.Expr) {
227-
if pkg.Name == "http" {
225+
// typeElts checks elements of type.
226+
func typeElts(pass *analysis.Pass, x *ast.Ident, typ *ast.SelectorExpr, elts []ast.Expr) {
227+
if x.Name == "http" {
228228
switch typ.Sel.Name {
229229
// http.Request{Method: http.MethodGet}
230230
case "Request":

0 commit comments

Comments
 (0)