net: Invalid CIDR in net.ParseCIDR causes panic #11393
Closed
Labels
Comments
When ParseCIDR fails, the returned values are:
|
True, it's actually me causing the panic by calling |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I wanted to check if a given CIDR from user is valid, so I tried using the following approach:
but that caused panic:
I'm using go
1.4.2
as it's obvious from the log above.See on playground: http://play.golang.org/p/CqmfdTgQLm
The cleanest workaround I was able to come up with:
The text was updated successfully, but these errors were encountered: