stack/context.go
func rootedIn(root string, parts []string) string {
	//log.Printf("rootIn(%s, %v)", root, parts)
	for i := 1; i < len(parts); i++ {
		suffix := filepath.Join(parts[i:]...)
		if isFile(filepath.Join(root, suffix)) {
			return filepath.Join(parts[:i]...)
		}
	}
	return ""
}
func rootedIn(root string, parts []string) string {
	//log.Printf("rootIn(%s, %v)", root, parts)
	for i := 1; i < len(parts); i++ {
		suffix := filepath.Join(parts[i:]...)
		if isFile(filepath.Join(root, suffix)) {
			return filepath.Join(parts[:i]...)
		}
	}
	return ""
}
func rootedIn ( root string , parts [ ] string ) string { //log.Printf("rootIn(%s, %v)", root, parts) for i := 1 ; i < len ( parts ) ; i ++ { suffix := filepath . Join ( parts [ i : ] ... ) if isFile ( filepath . Join ( root , suffix ) ) { return filepath . Join ( parts [ : i ] ... ) } } return " " }
// rootedIn returns a root if the file split in parts is rooted in root.
rootedIn returns a root if the file split in parts is rooted in root .