Skip to content

Commit

Permalink
fix: change "GO" to "Go" in the use-any rule
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Oct 25, 2024
1 parent 662e02c commit b6644cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rule/use-any.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (w lintUseAny) Visit(n ast.Node) ast.Visitor {
Node: n,
Confidence: 1,
Category: "naming",
Failure: "since GO 1.18 'interface{}' can be replaced by 'any'",
Failure: "since Go 1.18 'interface{}' can be replaced by 'any'",
})

return w
Expand Down
20 changes: 10 additions & 10 deletions testdata/use-any.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package pkg

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

type t interface{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
type a = interface{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
type t interface{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
type a = interface{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/

func any1(a interface{}) { // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
m1 := map[interface{}]string{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
m2 := map[int]interface{}{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
a := []interface{}{} // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
m3 := make(map[int]interface{}, 1) // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
a2 := make([]interface{}, 2) // MATCH /since GO 1.18 'interface{}' can be replaced by 'any'/
func any1(a interface{}) { // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
m1 := map[interface{}]string{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
m2 := map[int]interface{}{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
a := []interface{}{} // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
m3 := make(map[int]interface{}, 1) // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
a2 := make([]interface{}, 2) // MATCH /since Go 1.18 'interface{}' can be replaced by 'any'/
}

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

var ni interface{ Close() }

Expand Down

0 comments on commit b6644cc

Please sign in to comment.