code: func getNumCores() (int32, error) {
  	cores := int32(0)
  	cpus, err := cpu.Info()
  	if err != nil {
  		return cores, err
  	}
  	for _, c := range cpus {
  		cores += c.Cores
  	}
  	return cores, nil
  }
docs: // -- helpers