wrapper/array_test.go

22 lines
411 B
Go
Raw Normal View History

2023-06-11 21:17:27 +08:00
// Package wrapper ...
//
// Description : wrapper ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2023-06-11 21:12
package wrapper
import (
"fmt"
"testing"
)
func TestArray(t *testing.T) {
val := []interface{}{1, 2, 3}
2023-06-11 21:17:27 +08:00
fmt.Println(Array(val).IsValid())
fmt.Println(Array(val).ItemIsInterface())
2023-06-12 19:01:31 +08:00
valInt := []int{1, 2, 3, 1, 4, 5, 6, 7, 7, 6, 9}
fmt.Println(Array(valInt).Unique())
2023-06-11 21:17:27 +08:00
}