func firstClearBit(bs *bitset.BitSet) (uint, bool) { for i := uint(0); i < bs.Len(); i++ { if !bs.Test(i) { return i, true } } return 0, false }