func parseCIDR(s string) (*cidr, error) {

	c := &cidr{op: opInclude, str: s}
	_, network, err := net.ParseCIDR(strings.TrimPrefix(s, "!"))
	if err != nil {
		return nil, fmt.Errorf("%s is not a valid CIDR", s)
	}
	c.ipNet = *network
	if strings.HasPrefix(s, "!") {
		c.op = opExclude
	}

	return c, nil
}
// parseCIDR converts the given string to cidr. Returns an error if it wasnt able to parse a CIDR
parseCIDR converts the given string to cidr. Returns an error if it wasnt able to parse a CIDR
// parseCIDR converts the given string to cidr . Returns an error if it wasnt able to parse a CIDR
func parseCIDR(s string) (*cidr, error) {
	c := &cidr{op: opInclude, str: s}
	_, network, err := net.ParseCIDR(strings.TrimPrefix(s, "!"))
	if err != nil {
		return nil, fmt.Errorf("%s is not a valid CIDR", s)
	}
	c.ipNet = *network
	if strings.HasPrefix(s, "!") {
		c.op = opExclude
	}
	return c, nil
}
func parseCIDR ( s string ) ( * cidr , error ) { c := & cidr { op : opInclude , str : s } _ , network , err := net . ParseCIDR ( strings . TrimPrefix ( s , " " ) ) if err != nil { return nil , fmt . Errorf ( " " , s ) } c . ipNet = * network if strings . HasPrefix ( s , " " ) { c . op = opExclude } return c , nil }
parseCIDR converts the given string to cidr.
parseCIDR converts the given string to cidr .