package utils import ( "WechatGateWay/global" "fmt" "testing" ) func TestSLiceContain(t *testing.T) { fmt.Println(SliceContain(global.CMDList, "history")) fmt.Println(SliceContain(global.CMDList, "history1")) fmt.Println(SliceContain(global.CMDList, "kubectl ")) fmt.Println(SliceContain(global.CMDList, "kubectlssss ")) fmt.Println(SliceContain(global.CMDList, "kubectl get ns ")) } func TestSlicePrint(t *testing.T) { fmt.Println(SlicePrint(global.CMDList)) }