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.
|
package utils
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func SliceContain(cmds []string, cmd string) bool {
|
|
for _, v := range cmds {
|
|
if strings.Contains(cmd, v) {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
func SlicePrint(cmds []string) string {
|
|
res := ""
|
|
for _, v := range cmds {
|
|
res = res + v + "\n"
|
|
}
|
|
return res
|
|
}
|