code: func setAllocation(info **types.ResourceAllocationInfo) {
  	r := *info
  
  	if r.Shares.Level == "" {
  		r.Shares = nil
  	} else {
  		return
  	}
  
  	if r.Limit != nil {
  		return
  	}
  
  	if r.Reservation != nil {
  		return
  	}
  
  	*info = nil
  }
docs: // setAllocation sets *info=nil if none of the fields have been set.
  // We need non-nil fields for use with flag.FlagSet, but we want the
  // VirtualMachineConfigSpec fields to be nil if none of the related flags were given.