code: func (r *Resource) SetScalar(name v1.ResourceName, quantity int64) {
  	// Lazily allocate scalar resource map.
  	if r.ScalarResources == nil {
  		r.ScalarResources = map[v1.ResourceName]int64{}
  	}
  	r.ScalarResources[name] = quantity
  }
docs: // SetScalar sets a resource by a scalar value of this resource.