net/netip.Prefix.Bits (method)
12 uses
net/netip (current package)
netip.go#L1292: func (p Prefix) Bits() int { return int(p.bitsPlusOne) - 1 }
netip.go#L1302: func (p Prefix) IsSingleIP() bool { return p.IsValid() && p.Bits() == p.ip.BitLen() }
netip.go#L1316: if c := cmp.Compare(p.Bits(), p2.Bits()); c != 0 {
netip.go#L1388: m, _ := p.ip.Prefix(p.Bits())
netip.go#L1415: return uint32((ip.addr.lo^p.ip.addr.lo)>>((32-p.Bits())&63)) == 0
netip.go#L1420: return ip.addr.xor(p.ip.addr).and(mask6(p.Bits())).isZero()
netip.go#L1440: if pb, ob := p.Bits(), o.Bits(); pb < ob {
netip.go#L1486: b = appendDecimal(b, uint8(p.Bits()))
netip.go#L1525: b[len(b)-1] = uint8(p.Bits())
netip.go#L1549: return p.ip.String() + "/" + itoa.Itoa(p.Bits())
 |
The pages are generated with Golds v0.7.6. (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 @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |