(lhs, rhs ref.Val)
| 389 | } |
| 390 | |
| 391 | func netCIDRContainsIPString(lhs, rhs ref.Val) ref.Val { |
| 392 | cidr := lhs.(CIDR) |
| 393 | s := rhs.(types.String) |
| 394 | addr, err := parseIPAddr(string(s)) |
| 395 | if err != nil { |
| 396 | return types.WrapErr(err) |
| 397 | } |
| 398 | return types.Bool(cidr.Prefix.Contains(addr)) |
| 399 | } |
| 400 | |
| 401 | func netCIDRIP(val ref.Val) ref.Val { |
| 402 | cidr := val.(CIDR) |
nothing calls this directly
no test coverage detected