newBitSet function creates a new bitset from the provided bytes
(d []byte)
| 344 | |
| 345 | // newBitSet function creates a new bitset from the provided bytes |
| 346 | func newBitSet(d []byte) (*BitSet, error) { |
| 347 | // Create a new bitset |
| 348 | b := bitset.New(1) |
| 349 | // Unmarshal the provided bytes into the bitset |
| 350 | err := b.UnmarshalBinary(d) |
| 351 | if err != nil { |
| 352 | return nil, err |
| 353 | } |
| 354 | // Return the bitset |
| 355 | return &BitSet{b: b}, nil |
| 356 | } |
| 357 | |
| 358 | // At function checks if the bit at the specified position is set |
| 359 | func (b *BitSet) At(pos uint) bool { |
no test coverage detected