Skip to content

Commit

Permalink
sort namespaces to get stable output
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Oct 26, 2023
1 parent 392bcc8 commit 1d5ff8c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/revad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
"fmt"
"io"
"io/fs"
"slices"

"os"
"path"
"reflect"
Expand All @@ -41,6 +43,7 @@ import (
"github.com/cs3org/reva/pkg/logger"
"github.com/cs3org/reva/pkg/plugin"
"github.com/cs3org/reva/pkg/sysinfo"
"github.com/cs3org/reva/pkg/utils/maps"
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/rs/zerolog"
Expand Down Expand Up @@ -129,8 +132,13 @@ func handlePluginsFlag() {
bi = &debug.BuildInfo{}
}

namespaces := maps.Keys(grouped)
slices.Sort(namespaces)

count := 0
for ns, plugins := range grouped {
for _, ns := range namespaces {
plugins := grouped[ns]

fmt.Printf("[%s]\n", ns)
for _, p := range plugins {
pkgName := pkgOfFunction(p.New)
Expand Down

0 comments on commit 1d5ff8c

Please sign in to comment.