From b6644cc76c65006fb1e0854c237c66ba85093dba Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Fri, 25 Oct 2024 13:10:30 +0300 Subject: [PATCH] fix: change "GO" to "Go" in the use-any rule --- rule/use-any.go | 2 +- testdata/use-any.go | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/rule/use-any.go b/rule/use-any.go index bdf3c936d..88160c2fa 100644 --- a/rule/use-any.go +++ b/rule/use-any.go @@ -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 diff --git a/testdata/use-any.go b/testdata/use-any.go index bc6e64759..9891e844f 100644 --- a/testdata/use-any.go +++ b/testdata/use-any.go @@ -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() }