Split a string into a slice of substrings:
s := "a,b,c,d"
parts := strings.Split(s, ",") // ["a", "b", "c", "d"]
path := "/home/user/docs"
dirs := strings.Split(path, "/") // ["", "home", "user", "docs"]
Note that splitting "/home/user" on "/" gives an empty first element because there's nothing before the first separator.