func ToPaths(paths []string) []Path {
	split := make([]Path, len(paths))
	for i, p := range paths {
		split[i] = New(p)
	}
	return split
}
ToPaths cleans and splits each of the system-delimited filesystem paths.
package path
import (
	"path/filepath"
	"strings"
)
type Path []string
func New(s string) Path {
	s = filepath.ToSlash(filepath.Clean(s))
	switch {
	case s == "", s == ".":
		return nil
	case s == "/":
		return Path{"/"}
	case s[0] == '/':
		return append(Path{"/"}, strings.Split(s[1:], "/")...)
	default:
		return strings.Split(s, "/")
	}
}