Add strings.go utility

This commit is contained in:
Mark Beamer Jr 2020-09-01 14:36:59 -04:00
parent 73382bb021
commit 29574578c1
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973

12
extras/util/strings.go Normal file
View file

@ -0,0 +1,12 @@
package util
import "strings"
func StringSplitArg(stringToSplit, separator string) []interface{} {
split := strings.Split(stringToSplit, separator)
splitInterface := make([]interface{}, len(split))
for i, s := range split {
splitInterface[i] = s
}
return splitInterface
}