networkCIDRLength returns the bounded length of a CIDR receiver (at most 16 bytes), which bounds the estimate for a receiver of unknown size without changing the runtime charge.
()
| 837 | // networkCIDRLength returns the bounded length of a CIDR receiver (at most 16 bytes), which bounds |
| 838 | // the estimate for a receiver of unknown size without changing the runtime charge. |
| 839 | func networkCIDRLength() cost.QuantityExpr { |
| 840 | return cost.Min(cost.Length(cost.Target()), cost.Const(16)) |
| 841 | } |
| 842 | |
| 843 | // networkCIDRCompareCost returns the address comparison cost for a CIDR receiver, which reads the |
| 844 | // CIDR twice and therefore scans at twice StringCostFactor. |
no test coverage detected