code: func (r *Resource) ResourceList() v1.ResourceList {
  	result := v1.ResourceList{
  		v1.ResourceCPU:              *resource.NewMilliQuantity(r.MilliCPU, resource.DecimalSI),
  		v1.ResourceMemory:           *resource.NewQuantity(r.Memory, resource.BinarySI),
  		v1.ResourcePods:             *resource.NewQuantity(int64(r.AllowedPodNumber), resource.BinarySI),
  		v1.ResourceEphemeralStorage: *resource.NewQuantity(r.EphemeralStorage, resource.BinarySI),
  	}
  	for rName, rQuant := range r.ScalarResources {
  		if v1helper.IsHugePageResourceName(rName) {
  			result[rName] = *resource.NewQuantity(rQuant, resource.BinarySI)
  		} else {
  			result[rName] = *resource.NewQuantity(rQuant, resource.DecimalSI)
  		}
  	}
  	return result
  }
docs: // ResourceList returns a resource list of this resource.