net/netip.Prefix.Bits (method)
10 uses
net/netip (current package)
netip.go#L1257: func (p Prefix) Bits() int { return int(p.bitsPlusOne) - 1 }
netip.go#L1267: func (p Prefix) IsSingleIP() bool { return p.IsValid() && p.Bits() == p.ip.BitLen() }
netip.go#L1320: m, _ := p.ip.Prefix(p.Bits())
netip.go#L1347: return uint32((ip.addr.lo^p.ip.addr.lo)>>((32-p.Bits())&63)) == 0
netip.go#L1352: return ip.addr.xor(p.ip.addr).and(mask6(p.Bits())).isZero()
netip.go#L1372: if pb, ob := p.Bits(), o.Bits(); pb < ob {
netip.go#L1418: b = appendDecimal(b, uint8(p.Bits()))
netip.go#L1457: b[len(b)-1] = uint8(p.Bits())
netip.go#L1481: return p.ip.String() + "/" + itoa.Itoa(p.Bits())
|
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |