19 lines
343 B
Go
19 lines
343 B
Go
package jcstypes
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
func JoinObjectPath(comps ...string) string {
|
|
return strings.Join(comps, ObjectPathSeparator)
|
|
}
|
|
|
|
func SplitObjectPath(pat string) []string {
|
|
return strings.Split(pat, ObjectPathSeparator)
|
|
}
|
|
|
|
func BaseName(pat string) string {
|
|
idx := strings.LastIndex(pat, ObjectPathSeparator)
|
|
return pat[idx+1:]
|
|
}
|