Skip to content

Commit ce8cbf4

Browse files
committed
1. Rename typos
1 parent e885a15 commit ce8cbf4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
66
[![Coverage Status](https://coveralls.io/repos/github/maranqz/go-factory-lint/badge.svg?branch=main)](https://coveralls.io/github/maranqz/go-factory-lint?branch=main)
77

8-
The linter checks that the Structes are created by the Factory, and not directly.
8+
The linter checks that the Structures are created by the Factory, and not directly.
99

1010
The checking helps to provide invariants without exclusion and helps avoid creating an invalid object.
1111

factory.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func run(cfg *config) func(pass *analysis.Pass) (interface{}, error) {
8181
}
8282

8383
for _, file := range pass.Files {
84-
v := &visiter{
84+
v := &visitor{
8585
pass: pass,
8686
blockedStrategy: blockedStrategy,
8787
}
@@ -92,18 +92,18 @@ func run(cfg *config) func(pass *analysis.Pass) (interface{}, error) {
9292
}
9393
}
9494

95-
type visiter struct {
95+
type visitor struct {
9696
pass *analysis.Pass
9797
blockedStrategy blockedStrategy
9898
}
9999

100-
func (v *visiter) walk(n ast.Node) {
100+
func (v *visitor) walk(n ast.Node) {
101101
if n != nil {
102102
ast.Walk(v, n)
103103
}
104104
}
105105

106-
func (v *visiter) Visit(node ast.Node) ast.Visitor {
106+
func (v *visitor) Visit(node ast.Node) ast.Visitor {
107107
compLit, ok := node.(*ast.CompositeLit)
108108
if !ok {
109109
return v
@@ -141,7 +141,7 @@ func (v *visiter) Visit(node ast.Node) ast.Visitor {
141141
return v
142142
}
143143

144-
func (v *visiter) checkSlice(arr *ast.ArrayType, compLit *ast.CompositeLit) {
144+
func (v *visitor) checkSlice(arr *ast.ArrayType, compLit *ast.CompositeLit) {
145145
arrElt := arr.Elt
146146
if starExpr, ok := arr.Elt.(*ast.StarExpr); ok {
147147
arrElt = starExpr.X
@@ -165,7 +165,7 @@ func (v *visiter) checkSlice(arr *ast.ArrayType, compLit *ast.CompositeLit) {
165165
}
166166
}
167167

168-
func (v *visiter) report(node ast.Node, obj types.Object) {
168+
func (v *visitor) report(node ast.Node, obj types.Object) {
169169
v.pass.Reportf(
170170
node.Pos(),
171171
fmt.Sprintf(`Use factory for %s.%s`, obj.Pkg().Name(), obj.Name()),

0 commit comments

Comments
 (0)