From b88826a1cdd786df81c2bbfffc15d6eac2722ec6 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 17 Nov 2017 19:34:21 +0900 Subject: [PATCH] ing --- net/cidr/range.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/cidr/range.go b/net/cidr/range.go index 1d76987..3dbff65 100644 --- a/net/cidr/range.go +++ b/net/cidr/range.go @@ -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,