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

Implements ipinfo tool is_valid #170

Merged
merged 9 commits into from
Sep 7, 2023
Merged

Implements ipinfo tool is_valid #170

merged 9 commits into from
Sep 7, 2023

Conversation

Harisabdullah
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Aug 29, 2023

BE-2215 CLI: ipinfo tool valid

Implement `ipinfo tool valid`` function of netIP.

Copy link
Contributor

@UmanShahzad UmanShahzad left a comment

Choose a reason for hiding this comment

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

Needs to follow subcmd naming style as used in others (snake case not pascal / camel case).

ipinfo/cmd_tool.go Outdated Show resolved Hide resolved
@@ -15,6 +15,7 @@ var completionsTool = &complete.Command{
"next": completionsToolNext,
"prev": completionsToolPrev,
"is_v4": completionsToolIsV4,
"isValid": completionsToolIsValid,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be is_valid.

`Usage: %s tool IsValid <ip>

Description:
reports whether the Addr is an initialized address (not the zero Addr).
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Examples:
%[1]s IsValid "190.87.89.1"
%[1]s IsValid "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
%[1]s IsValid "::"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do provide an invalid example if not already

lib/cmd_tool_valid.go Outdated Show resolved Hide resolved
@Harisabdullah Harisabdullah changed the title Implements ipinfo tool isValid Implements ipinfo tool is_valid Aug 30, 2023
Copy link
Contributor

@UmanShahzad UmanShahzad left a comment

Choose a reason for hiding this comment

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

One small fix

`Usage: %s tool is_valid <ip>

Description:
reports whether the ip address is an initialized address (not the zero Addr).
Copy link
Contributor

Choose a reason for hiding this comment

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

I left a comment here as well to update this desc to match the short desc above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! I'll take care of it

@UmanShahzad UmanShahzad merged commit 7547c17 into master Sep 7, 2023
@UmanShahzad UmanShahzad deleted the haris/BE-2215 branch September 7, 2023 11:40
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.

2 participants