@@ -81,7 +81,7 @@ func run(cfg *config) func(pass *analysis.Pass) (interface{}, error) {
81
81
}
82
82
83
83
for _ , file := range pass .Files {
84
- v := & visiter {
84
+ v := & visitor {
85
85
pass : pass ,
86
86
blockedStrategy : blockedStrategy ,
87
87
}
@@ -92,18 +92,18 @@ func run(cfg *config) func(pass *analysis.Pass) (interface{}, error) {
92
92
}
93
93
}
94
94
95
- type visiter struct {
95
+ type visitor struct {
96
96
pass * analysis.Pass
97
97
blockedStrategy blockedStrategy
98
98
}
99
99
100
- func (v * visiter ) walk (n ast.Node ) {
100
+ func (v * visitor ) walk (n ast.Node ) {
101
101
if n != nil {
102
102
ast .Walk (v , n )
103
103
}
104
104
}
105
105
106
- func (v * visiter ) Visit (node ast.Node ) ast.Visitor {
106
+ func (v * visitor ) Visit (node ast.Node ) ast.Visitor {
107
107
compLit , ok := node .(* ast.CompositeLit )
108
108
if ! ok {
109
109
return v
@@ -141,7 +141,7 @@ func (v *visiter) Visit(node ast.Node) ast.Visitor {
141
141
return v
142
142
}
143
143
144
- func (v * visiter ) checkSlice (arr * ast.ArrayType , compLit * ast.CompositeLit ) {
144
+ func (v * visitor ) checkSlice (arr * ast.ArrayType , compLit * ast.CompositeLit ) {
145
145
arrElt := arr .Elt
146
146
if starExpr , ok := arr .Elt .(* ast.StarExpr ); ok {
147
147
arrElt = starExpr .X
@@ -165,7 +165,7 @@ func (v *visiter) checkSlice(arr *ast.ArrayType, compLit *ast.CompositeLit) {
165
165
}
166
166
}
167
167
168
- func (v * visiter ) report (node ast.Node , obj types.Object ) {
168
+ func (v * visitor ) report (node ast.Node , obj types.Object ) {
169
169
v .pass .Reportf (
170
170
node .Pos (),
171
171
fmt .Sprintf (`Use factory for %s.%s` , obj .Pkg ().Name (), obj .Name ()),
0 commit comments