Implementation of Folder Jumping

This commit is contained in:
Sl@ny authored and Kim "BKC" Carlbäcker committed 2016-12-28 18:09:52 +01:00
1 parent 331316894e
commit c22f9114c7
6 files changed
+54 -5

No files matched your search

+11
View File
@@ -117,6 +117,17 @@ func NewFuncMap() []template.FuncMap {
}
return "tab-size-8"
},
"SubJumpablePath": func(str string) []string {
var path []string
index := strings.LastIndex(str, "/")
if index != -1 && index != len(str) {
path = append(path, string(str[0:index+1]))
path = append(path, string(str[index+1:]))
} else {
path = append(path, str)
}
return path
},
}}
}