Skip to content

Commit 9b01af9

Browse files
refactor: rename pkgFunArgs func
1 parent ea97191 commit 9b01af9

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
@@ -65,12 +65,12 @@ func run(pass *analysis.Pass) (interface{}, error) {
6565
return
6666
}
6767

68-
pkg, ok := fun.X.(*ast.Ident)
68+
x, ok := fun.X.(*ast.Ident)
6969
if !ok {
7070
return
7171
}
7272

73-
pkgFunArgs(pass, pkg, fun, n.Args)
73+
funArgs(pass, x, fun, n.Args)
7474

7575
case *ast.BasicLit:
7676
if lookupFlag(pass, TimeWeekdayFlag) {
@@ -214,9 +214,9 @@ func run(pass *analysis.Pass) (interface{}, error) {
214214
return nil, nil
215215
}
216216

217-
// pkgFunArgs checks arguments of function from package.
218-
func pkgFunArgs(pass *analysis.Pass, pkg *ast.Ident, fun *ast.SelectorExpr, args []ast.Expr) {
219-
switch pkg.Name {
217+
// funArgs checks arguments of function or method.
218+
func funArgs(pass *analysis.Pass, x *ast.Ident, fun *ast.SelectorExpr, args []ast.Expr) {
219+
switch x.Name {
220220
case "http":
221221
switch fun.Sel.Name {
222222
// http.NewRequest(http.MethodGet, "localhost", http.NoBody)

0 commit comments

Comments
 (0)