1
0
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:
Marcin Federowicz
2023-09-24 08:44:02 +02:00
committed by GitHub
parent 5ccebe86c2
commit 36c2ee2718
36 changed files with 75 additions and 75 deletions

View File

@@ -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{