常用类型及数据操作方法
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.

27 lines
468 B

  1. package helper
  2. import (
  3. "fmt"
  4. "testing"
  5. )
  6. func Test_Diff(t *testing.T) {
  7. var aa = []string{"43", "33"}
  8. var bb = []string{"2", "33", "1"}
  9. cc := Diff(aa, bb)
  10. fmt.Println(cc)
  11. }
  12. func Test_Intersect(t *testing.T) {
  13. var aa = []string{"43", "33"}
  14. var bb = []string{"2", "33", "1"}
  15. cc := Intersect(aa, bb)
  16. fmt.Println(cc)
  17. }
  18. func Test_Union(t *testing.T) {
  19. var aa = []string{"43", "33"}
  20. var bb = []string{"2", "33", "1"}
  21. cc := Union(aa, bb)
  22. fmt.Println(cc)
  23. }