(lhs, rhs ref.Val)
| 363 | } |
| 364 | |
| 365 | func netCIDRContainsIPString(lhs, rhs ref.Val) ref.Val { |
| 366 | cidr := lhs.(CIDR) |
| 367 | s := rhs.(types.String) |
| 368 | addr, err := parseIPAddr(string(s)) |
| 369 | if err != nil { |
| 370 | return types.WrapErr(err) |
| 371 | } |
| 372 | return types.Bool(cidr.Prefix.Contains(addr)) |
| 373 | } |
| 374 | |
| 375 | func netCIDRIP(val ref.Val) ref.Val { |
| 376 | cidr := val.(CIDR) |
nothing calls this directly
no test coverage detected