(lhs, rhs ref.Val)
| 336 | } |
| 337 | |
| 338 | func netCIDRContainsIPString(lhs, rhs ref.Val) ref.Val { |
| 339 | cidr := lhs.(CIDR) |
| 340 | s := rhs.(types.String) |
| 341 | addr, err := parseIPAddr(string(s)) |
| 342 | if err != nil { |
| 343 | return types.WrapErr(err) |
| 344 | } |
| 345 | return types.Bool(cidr.Prefix.Contains(addr)) |
| 346 | } |
| 347 | |
| 348 | func netCIDRIP(val ref.Val) ref.Val { |
| 349 | cidr := val.(CIDR) |
nothing calls this directly
no test coverage detected