Skip to content

Commit fa9af82

Browse files
authored
fix: change "GO" to "Go" in the use-any rule (#1077)
1 parent 9a8587c commit fa9af82

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

rule/use-any.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (w lintUseAny) Visit(n ast.Node) ast.Visitor {
4747
Node: n,
4848
Confidence: 1,
4949
Category: "naming",
50-
Failure: "since GO 1.18 'interface{}' can be replaced by 'any'",
50+
Failure: "since Go 1.18 'interface{}' can be replaced by 'any'",
5151
})
5252

5353
return w

testdata/use-any.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
package pkg
22

3-
var i interface{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
3+
var i interface{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
44

5-
type t interface{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
6-
type a = interface{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
5+
type t interface{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
6+
type a = interface{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
77

8-
func any1(a interface{}) { // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
9-
m1 := map[interface{}]string{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
10-
m2 := map[int]interface{}{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
11-
a := []interface{}{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
12-
m3 := make(map[int]interface{}, 1) // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
13-
a2 := make([]interface{}, 2) // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
8+
func any1(a interface{}) { // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
9+
m1 := map[interface{}]string{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
10+
m2 := map[int]interface{}{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
11+
a := []interface{}{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
12+
m3 := make(map[int]interface{}, 1) // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
13+
a2 := make([]interface{}, 2) // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
1414
}
1515

16-
func any2(a int) interface{} {} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
16+
func any2(a int) interface{} {} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
1717

1818
var ni interface{ Close() }
1919

0 commit comments

Comments
 (0)