-
Notifications
You must be signed in to change notification settings - Fork 154
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
Conversation
lib/cmd_tool_prefix_addr.go
Outdated
@@ -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 |
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.
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.
lib/cmd_tool_prefix_bits.go
Outdated
return err | ||
} | ||
fmt.Printf("%s,%d\n", input, prefix.Bits()) | ||
default: |
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.
See above
lib/cmd_tool_prefix_masked.go
Outdated
return err | ||
} | ||
fmt.Printf("%s,%s\n", input, prefix.Masked()) | ||
default: |
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.
See above
lib/cmd_tool_prefix_valid.go
Outdated
return err | ||
} | ||
fmt.Printf("%s,%t\n", input, prefix.IsValid()) | ||
default: |
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.
See above
No description provided.