File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 4
4
"fmt"
5
5
"os"
6
6
"path/filepath"
7
+ "slices"
7
8
"strings"
8
9
)
9
10
@@ -22,13 +23,7 @@ func Keys[K comparable, V any](m map[K]V) []K {
22
23
23
24
// Contains checks if slice contains element.
24
25
func Contains [T comparable ](s []T , e T ) bool {
25
- for _ , v := range s {
26
- if v == e {
27
- return true
28
- }
29
- }
30
-
31
- return false
26
+ return slices .Contains (s , e )
32
27
}
33
28
34
29
// NullToEmpty returns empty slice if provided slice is nil.
Original file line number Diff line number Diff line change @@ -587,7 +587,7 @@ func (l Linter) paramsToRulesConfig() map[string]any {
587
587
params ["ignore_files" ] = l .ignoreFiles
588
588
}
589
589
590
- return map [string ]interface {} {
590
+ return map [string ]any {
591
591
"eval" : map [string ]any {
592
592
"params" : params ,
593
593
},
You can’t perform that action at this time.
0 commit comments