gitee.com/quant1x/gox@v1.21.2/api/slices_unique_test.go (about) 1 package api 2 3 import ( 4 "fmt" 5 "testing" 6 ) 7 8 func TestUnique(t *testing.T) { 9 s := []int{1, 2, 3, 4, 1, 1, 2, 2, 5, 1, 1, 1, 1, 1, 5, 5, 5, 3, 3, 3} 10 s = Unique(s) 11 fmt.Println(s) 12 }