mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-05 04:47:40 +03:00
Make linter happy
This commit is contained in:
parent
aa7007a947
commit
beeeba3388
12 changed files with 26 additions and 33 deletions
|
@ -35,7 +35,7 @@ func Contains[T comparable](arr []T, target T) bool {
|
|||
}
|
||||
|
||||
func Map[T any, N any](arr []T, block func(it T) N) []N {
|
||||
var retArr []N
|
||||
retArr := make([]N, 0, len(arr))
|
||||
for index := range arr {
|
||||
retArr = append(retArr, block(arr[index]))
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ func Map[T any, N any](arr []T, block func(it T) N) []N {
|
|||
}
|
||||
|
||||
func MapIndexed[T any, N any](arr []T, block func(index int, it T) N) []N {
|
||||
var retArr []N
|
||||
retArr := make([]N, 0, len(arr))
|
||||
for index := range arr {
|
||||
retArr = append(retArr, block(index, arr[index]))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue