Add strings.go utility
This commit is contained in:
parent
73382bb021
commit
29574578c1
1 changed files with 12 additions and 0 deletions
12
extras/util/strings.go
Normal file
12
extras/util/strings.go
Normal 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
|
||||
}
|
Loading…
Reference in a new issue