常用类型及数据操作方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

33 lines
587 B

package helper
import (
"fmt"
"testing"
)
func Test_Diff(t *testing.T) {
var aa = []string{"43", "33"}
var bb = []string{"2", "33", "1"}
cc := Diff(aa, bb)
fmt.Println(cc)
}
func Test_Intersect(t *testing.T) {
var aa = []string{"43", "33"}
var bb = []string{"2", "33", "1"}
cc := Intersect(aa, bb)
fmt.Println(cc)
}
func Test_Union(t *testing.T) {
var aa = []string{"43", "33"}
var bb = []string{"2", "33", "1"}
cc := Union(aa, bb)
fmt.Println(cc)
}
func Test_Unique(t *testing.T) {
var str = []string{"1", "2", "2"}
ret, err := Unique(str)
fmt.Println(ret, err)
}