ing
This commit is contained in:
parent
8361ad5b53
commit
b88826a1cd
|
@ -6,12 +6,12 @@ import (
|
|||
)
|
||||
|
||||
func NewCIDRRanger(cidr string) (CIDRRanger, error) {
|
||||
nIP, nIPNet, err := net.ParseCIDR(cidr)
|
||||
_, nIPNet, err := net.ParseCIDR(cidr)
|
||||
if nil != err {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch len(nIP) {
|
||||
switch len(nIPNet.IP) {
|
||||
case net.IPv4len:
|
||||
cr := &cidrRangeIPv4{
|
||||
cidrNet: nIPNet,
|
||||
|
|
Loading…
Reference in New Issue
Block a user