Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiriMoran committed Sep 30, 2024
1 parent 42165d8 commit 54524af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/vpcmodel/drawioGenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (g *groupedExternalNodes) GenerateDrawioTreeNode(gen *DrawioGenerator) draw
if all, _ := isEntirePublicInternetRange(*g); all {
name = publicInternetNodeName
} else {
_, ipBlock := g.toIpBlocks()
_, ipBlock := g.toIPBlocks()
if len(ipBlock.ToCidrList()) == 1 {
name = ipBlock.String()
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/vpcmodel/grouping.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,15 @@ func listEndpointElemStr(eps []EndpointElem, fn func(ep EndpointElem) string) st

func (g *groupedExternalNodes) String() string {
// 1 gets list and a union of all IPBlocks
ipbList, unionBlock := g.toIpBlocks()
ipbList, unionBlock := g.toIPBlocks()
for _, ipBlock := range ipbList {
unionBlock = unionBlock.Union(ipBlock)
}
// 2. print a list s.t. each element contains either a single cidr or an ip range
return strings.Join(unionBlock.ListToPrint(), commaSeparator)
}

func (g *groupedExternalNodes) toIpBlocks() (ipbList []*ipblock.IPBlock, unionBlock *ipblock.IPBlock) {
func (g *groupedExternalNodes) toIPBlocks() (ipbList []*ipblock.IPBlock, unionBlock *ipblock.IPBlock) {
// 1. Created a list of IPBlocks
cidrList := make([]string, len(*g))
for i, n := range *g {
Expand Down

0 comments on commit 54524af

Please sign in to comment.