code: func (s *CidrSet) AllocateNext() (*net.IPNet, error) {
  	s.Lock()
  	defer s.Unlock()
  
  	nextUnused := -1
  	for i := 0; i < s.maxCIDRs; i++ {
  		candidate := (i + s.nextCandidate) % s.maxCIDRs
  		if s.used.Bit(candidate) == 0 {
  			nextUnused = candidate
  			break
  		}
  	}
  	if nextUnused == -1 {
  		return nil, ErrCIDRRangeNoCIDRsRemaining
  	}
  	s.nextCandidate = (nextUnused + 1) % s.maxCIDRs
  
  	s.used.SetBit(&s.used, nextUnused, 1)
  
  	return s.indexToCIDRBlock(nextUnused), nil
  }
docs: // AllocateNext allocates the next free CIDR range. This will set the range
  // as occupied and return the allocated range.