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

CLI: ipinfo tool prefix Masked / Bits / IsValid #180

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Conversation

AhmadMujahid2k
Copy link
Collaborator

No description provided.

@linear
Copy link

linear bot commented Oct 4, 2023

@@ -33,6 +33,8 @@ func CmdToolPrefixAddr(f CmdToolPrefixAddrFlags, args []string, printHelp func()
return err
}
fmt.Printf("%s,%s\n", input, prefix.Addr())
default:
return ErrInvalidInput
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't add this - we want to ignore invalid inputs, as that gives for a cleaner interface for users who have files they pipe in with extra data sometimes.

return err
}
fmt.Printf("%s,%d\n", input, prefix.Bits())
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

See above

return err
}
fmt.Printf("%s,%s\n", input, prefix.Masked())
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

See above

return err
}
fmt.Printf("%s,%t\n", input, prefix.IsValid())
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

See above

@UmanShahzad UmanShahzad merged commit 5040fa4 into master Oct 4, 2023
@UmanShahzad UmanShahzad deleted the ahmad/BE-2211 branch October 4, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants