Skip to content
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

Merged
merged 7 commits into from
Oct 1, 2024

Conversation

ShiriMoran
Copy link
Contributor

No description provided.

@ShiriMoran ShiriMoran linked an issue Sep 30, 2024 that may be closed by this pull request
pkg/vpcmodel/grouping.go Outdated Show resolved Hide resolved
pkg/vpcmodel/drawioGenerator.go Outdated Show resolved Hide resolved
@ShiriMoran ShiriMoran marked this pull request as draft October 1, 2024 05:48
@ShiriMoran ShiriMoran marked this pull request as ready for review October 1, 2024 05:49
@ShiriMoran ShiriMoran requested a review from zivnevo October 1, 2024 06:02
// 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
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, done

return strings.Join(unionBlock.ListToPrint(), commaSeparator)
}

func (g *groupedExternalNodes) toIPBlocks() *ipblock.IPBlock {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (g *groupedExternalNodes) toIPBlocks() *ipblock.IPBlock {
func (g *groupedExternalNodes) toIPBlock() *ipblock.IPBlock {

To be more consistent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ShiriMoran ShiriMoran merged commit 22fd40b into main Oct 1, 2024
4 checks passed
@ShiriMoran ShiriMoran deleted the 894_html_single_cidr_print branch October 1, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

misleading name of node in html representation
3 participants