Skip to content

Commit

Permalink
make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiriMoran committed Aug 15, 2023
1 parent 0db151c commit 5ad89a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
16 changes: 5 additions & 11 deletions pkg/vpcmodel/grouping.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,11 @@ func (g *GroupConnLines) groupExternalAddressesForSubnets() {
continue
}
connString := conns.EnhancedString()
hasExternal := false
switch dst.(type) {
case Node:
if dst.(Node).IsPublicInternet() {
hasExternal = true
g.srcToDst.addPublicConnectivity(src, connString, dst.(Node))
}
}
// since pgw enable only egress src can not be public internet
// not an external connection in source or destination - nothing to group, just append
if !hasExternal {
if dstNode, ok := dst.(Node); ok && dstNode.IsPublicInternet() {
g.srcToDst.addPublicConnectivity(src, connString, dstNode)
} else {
// since pgw enable only egress src can not be public internet
// not an external connection in source or destination - nothing to group, just append
res = append(res, &GroupedConnLine{src, dst, connString})
}
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/vpcmodel/subnetsConnectivity.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package vpcmodel

import (
"github.com/np-guard/vpc-network-config-analyzer/pkg/common"

"errors"
"fmt"
"github.com/np-guard/vpc-network-config-analyzer/pkg/common"
)

// VPCsubnetConnectivity captures allowed connectivity for subnets, considering nacl and pgw resources
Expand Down

0 comments on commit 5ad89a8

Please sign in to comment.