root.yaml prio, otherwise sort -f results
parent
c559c8eba6
commit
05f5244cd1
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
|
@ -387,5 +388,11 @@ func listDir(dname string) ([]string, error) {
|
||||||
}
|
}
|
||||||
paths = append(paths, path.Join(dname, entries[i].Name()))
|
paths = append(paths, path.Join(dname, entries[i].Name()))
|
||||||
}
|
}
|
||||||
|
sort.Slice(paths, func(i, j int) bool {
|
||||||
|
if path.Base(paths[i]) == "root.yaml" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return paths[i] < paths[j]
|
||||||
|
})
|
||||||
return paths, nil
|
return paths, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
todo:
|
||||||
|
- root
|
||||||
|
scheduled: []
|
||||||
|
done: []
|
||||||
Loading…
Reference in New Issue