Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
haim-kermany committed Jan 4, 2024
1 parent cc65300 commit 9bfb790
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/drawio/drawio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func createNetworkSubnetGrouping() SquareTreeNodeInterface {
{0, 6, 6, 2, 3},
{0, 7, 8, 1, 2},
}
return createNetworkSubnetGroupingGeneric(1, groupsIndexes)
return createNetworkSubnetGroupingGeneric(groupsIndexes)
}

func createNetworkSubnetGroupingMultiVpc() SquareTreeNodeInterface {
Expand All @@ -353,10 +353,10 @@ func createNetworkSubnetGroupingMultiVpc() SquareTreeNodeInterface {
{2, 16, 17, 0, 1},
{2, 17, 18, 0, 1},
}
return createNetworkSubnetGroupingGeneric(1, groupsIndexes)
return createNetworkSubnetGroupingGeneric(groupsIndexes)
}

func createNetworkSubnetGroupingGeneric(nVpcs int, groupsIndexes []groupIndexes) SquareTreeNodeInterface {
func createNetworkSubnetGroupingGeneric(groupsIndexes []groupIndexes) SquareTreeNodeInterface {
network := NewNetworkTreeNode()
zones := &[][]SquareTreeNodeInterface{}
cloud1 := NewCloudTreeNode(network, "IBM Cloud")
Expand Down
4 changes: 4 additions & 0 deletions pkg/drawio/subnetsLayout.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ func (ly *subnetsLayout) calcZoneOrder() {
}
}
zoneOrders = append(zoneOrders, zoneOrder)
ly.setZonesCol(zoneOrders)
}

func (ly *subnetsLayout) setZonesCol(zoneOrders [][]TreeNodeInterface) {
// zoneOrders of the same VPCs must be together
// sorting the zoneOrders by their VPCs:
vpcToOrders := map[TreeNodeInterface][][]TreeNodeInterface{}
Expand Down

0 comments on commit 9bfb790

Please sign in to comment.