Skip to content

Commit

Permalink
Sort commatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
sabinaaledort committed Apr 25, 2024
1 parent ee48bff commit 1ad046b
Show file tree
Hide file tree
Showing 8 changed files with 542 additions and 512 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ build:

# TODO: check if oc is installed
generate: build
rm -rf $(DEST_DIR)/communication-matrix
mkdir -p $(DEST_DIR)/communication-matrix
./$(EXECUTABLE) -format=$(FORMAT) -env=$(CLUSTER_ENV) -destDir=$(DEST_DIR)/communication-matrix -deployment=$(DEPLOYMENT)

Expand Down
3 changes: 3 additions & 0 deletions commatrix/commatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io"
"os"
"path/filepath"
"slices"

"github.com/openshift-kni/commatrix/client"
"github.com/openshift-kni/commatrix/endpointslices"
Expand Down Expand Up @@ -69,6 +70,8 @@ func New(kubeconfigPath string, customEntriesPath string, e Env, d Deployment) (
res = append(res, customComDetails...)
}

slices.SortFunc(res, types.CmpComDetails)

return &types.ComMatrix{Matrix: res}, nil
}

Expand Down
Loading

0 comments on commit 1ad046b

Please sign in to comment.