Reduce allocations

This commit is contained in:
Julian Kornberger 2018-09-30 22:42:33 +02:00 committed by Alessandro Boch
parent b48eed5d7d
commit d741264626

View File

@ -27,7 +27,8 @@ func ParseIPNet(s string) (*net.IPNet, error) {
if err != nil {
return nil, err
}
return &net.IPNet{IP: ip, Mask: ipNet.Mask}, nil
ipNet.IP = ip
return ipNet, nil
}
// NewIPNet generates an IPNet from an ip address using a netmask of 32 or 128.