go-common/app/admin/main/videoup/service/util_test.go
2019-04-22 18:49:16 +08:00

15 lines
373 B
Go

package service
import (
"strings"
"testing"
)
func TestSliceUnique(t *testing.T) {
var slice1 = []string{"绘画", "哈哈", "22", "2223", "绘画"}
t.Logf("unique : %v", SliceUnique(Slice2Interface(slice1)))
tag := "绘画, 哈哈, 22, 2223, 绘画"
t.Logf("unique : %v", strings.Join(Slice2String(SliceUnique(Slice2Interface(strings.Split(tag, ",")))), ","))
}