mirror of
https://github.com/openziti/zrok.git
synced 2024-12-22 23:02:52 +01:00
sort objects list (#438)
This commit is contained in:
parent
3ccbfe2829
commit
6a1f429749
@ -10,6 +10,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"net/url"
|
||||
"os"
|
||||
"sort"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -55,6 +56,9 @@ func (cmd *dirCommand) run(_ *cobra.Command, args []string) {
|
||||
if err != nil {
|
||||
tui.Error("error listing directory", err)
|
||||
}
|
||||
sort.Slice(objects, func(i, j int) bool {
|
||||
return objects[i].Path < objects[j].Path
|
||||
})
|
||||
|
||||
tw := table.NewWriter()
|
||||
tw.SetOutputMirror(os.Stdout)
|
||||
|
Loading…
Reference in New Issue
Block a user