mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
code cleanup: replace interface{} with any (#906)
This commit is contained in:
committed by
GitHub
parent
5ccebe86c2
commit
36c2ee2718
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func TestImportsBlacklistOriginal(t *testing.T) {
|
||||
args := []interface{}{"crypto/md5", "crypto/sha1"}
|
||||
args := []any{"crypto/md5", "crypto/sha1"}
|
||||
|
||||
testRule(t, "imports-blacklist-original", &rule.ImportsBlacklistRule{}, &lint.RuleConfig{
|
||||
Arguments: args,
|
||||
@@ -16,7 +16,7 @@ func TestImportsBlacklistOriginal(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportsBlacklist(t *testing.T) {
|
||||
args := []interface{}{"github.com/full/match", "wildcard/**/between", "wildcard/backward/**", "**/wildcard/forward", "full"}
|
||||
args := []any{"github.com/full/match", "wildcard/**/between", "wildcard/backward/**", "**/wildcard/forward", "full"}
|
||||
|
||||
testRule(t, "imports-blacklist", &rule.ImportsBlacklistRule{}, &lint.RuleConfig{
|
||||
Arguments: args,
|
||||
@@ -24,7 +24,7 @@ func TestImportsBlacklist(t *testing.T) {
|
||||
}
|
||||
|
||||
func BenchmarkImportsBlacklist(b *testing.B) {
|
||||
args := []interface{}{"github.com/full/match", "wildcard/**/between", "wildcard/backward/**", "**/wildcard/forward", "full"}
|
||||
args := []any{"github.com/full/match", "wildcard/**/between", "wildcard/backward/**", "**/wildcard/forward", "full"}
|
||||
var t *testing.T
|
||||
for i := 0; i <= b.N; i++ {
|
||||
testRule(t, "imports-blacklist", &rule.ImportsBlacklistRule{}, &lint.RuleConfig{
|
||||
|
||||
Reference in New Issue
Block a user