mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-02-14 08:45:35 +08:00
feat: 代码优化、机器计划任务完善
This commit is contained in:
17
server/pkg/utils/collx/array_test.go
Normal file
17
server/pkg/utils/collx/array_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package collx
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestArrayCompare(t *testing.T) {
|
||||
newArr := []any{1, 2, 3, 5}
|
||||
oldArr := []any{3, 6}
|
||||
add, del, unmodifier := ArrayCompare(newArr, oldArr, func(i1, i2 any) bool {
|
||||
return i1.(int) == i2.(int)
|
||||
})
|
||||
fmt.Println(add...)
|
||||
fmt.Println(del...)
|
||||
fmt.Println(unmodifier...)
|
||||
}
|
||||
Reference in New Issue
Block a user