|
- package cmd
-
- import "strings"
-
- func SplitObjectPath(str string) (bkt string, pkg string, obj string, ok bool) {
- comps := strings.Split(str, ":")
- if len(comps) != 2 {
- return "", "", "", false
- }
-
- pat := comps[1]
- comps = strings.Split(comps[0], "/")
- if len(comps) != 2 {
- return "", "", "", false
- }
-
- return comps[0], comps[1], pat, true
- }
|