Source File
ints.go
Belonging Package
google.golang.org/protobuf/internal/set
package set
import
type Ints struct {
lo int64s
hi map[uint64]struct{}
}
func ( *Ints) () int {
return .lo.Len() + len(.hi)
}
func ( *Ints) ( uint64) bool {
if < 64 {
return .lo.Has()
}
, := .hi[]
return
}
func ( *Ints) ( uint64) {
if < 64 {
.lo.Set()
return
}
if .hi == nil {
.hi = make(map[uint64]struct{})
}
.hi[] = struct{}{}
}
func ( *Ints) ( uint64) {
if < 64 {
.lo.Clear()
return
}
delete(.hi, )
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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. |