code: func (r *Range) Allocate(ip net.IP) error {
  	ok, offset := r.contains(ip)
  	if !ok {
  		return &ErrNotInRange{r.net.String()}
  	}
  
  	allocated, err := r.alloc.Allocate(offset)
  	if err != nil {
  		return err
  	}
  	if !allocated {
  		return ErrAllocated
  	}
  	return nil
  }
docs: // Allocate attempts to reserve the provided IP. ErrNotInRange or
  // ErrAllocated will be returned if the IP is not valid for this range
  // or has already been reserved.  ErrFull will be returned if there
  // are no addresses left.