MCPcopy Create free account
hub / github.com/blobcache/blobcache / IsSet

Method IsSet

src/blobcache/bitmap.go:13–25  ·  view source on GitHub ↗

IsSet returns true if bit i is true

(i int)

Source from the content-addressed store, hash-verified

11
12// IsSet returns true if bit i is true
13func (bm BitMap) IsSet(i int) bool {
14 if i < 0 {
15 return false
16 }
17
18 word := i / bits.UintSize
19 if word >= len(bm) {
20 return false
21 }
22
23 bit := uint(i % bits.UintSize)
24 return bm[word]&(uint(1)<<bit) != 0
25}
26
27// Set causes bit i to be true/1
28func (bm *BitMap) Set(i int) {

Callers 10

handleTxMethod · 0.95
TxAPIFunction · 0.95
ExistsFunction · 0.95
IsVisitedFunction · 0.95
GetMethod · 0.95
CopyMethod · 0.95
existsSingleFunction · 0.95
ExistsUnitFunction · 0.95
tx.goFile · 0.80
ORMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected