1package gitweb
2
3// byType sorts RepoFiles by their object type (directories first).
4type byType []RepoFile
5
6func (t byType) Len() int {
7 return len(t)
8}
9
10func (t byType) Swap(i, j int) {
11 t[i], t[j] = t[j], t[i]
12}
13
14func (t byType) Less(i, j int) bool {
15 return t[i].IsDir() && !t[j].IsDir()
16}