net/netip.Prefix.Bits (method)
12 uses
net/netip (current package)
netip.go#L1321: func (p Prefix) Bits() int { return int(p.bitsPlusOne) - 1 }
netip.go#L1331: func (p Prefix) IsSingleIP() bool { return p.IsValid() && p.Bits() == p.ip.BitLen() }
netip.go#L1345: if c := cmp.Compare(p.Bits(), p2.Bits()); c != 0 {
netip.go#L1417: m, _ := p.ip.Prefix(p.Bits())
netip.go#L1444: return uint32((ip.addr.lo^p.ip.addr.lo)>>((32-p.Bits())&63)) == 0
netip.go#L1449: return ip.addr.xor(p.ip.addr).and(mask6(p.Bits())).isZero()
netip.go#L1469: if pb, ob := p.Bits(), o.Bits(); pb < ob {
netip.go#L1515: b = appendDecimal(b, uint8(p.Bits()))
netip.go#L1563: return append(b, uint8(p.Bits())), nil
netip.go#L1594: return p.ip.String() + "/" + itoa.Itoa(p.Bits())
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)