-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print cidr in graph in case of a single cidr #895
Conversation
pkg/vpcmodel/grouping.go
Outdated
// 1. Created a list of IPBlocks | ||
cidrList := make([]string, len(*g)) | ||
for i, n := range *g { | ||
cidrList[i] = n.CidrStr | ||
} | ||
ipbList, _, err := ipStringsToIPblocks(cidrList) | ||
if err != nil { | ||
return "" | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to return an empty IPBlock, to avoid nil dereferencing issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, done
pkg/vpcmodel/grouping.go
Outdated
return strings.Join(unionBlock.ListToPrint(), commaSeparator) | ||
} | ||
|
||
func (g *groupedExternalNodes) toIPBlocks() *ipblock.IPBlock { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (g *groupedExternalNodes) toIPBlocks() *ipblock.IPBlock { | |
func (g *groupedExternalNodes) toIPBlock() *ipblock.IPBlock { |
To be more consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.