code: func genChaincodeDeploymentSpec(cmd *cobra.Command, chaincodeName, chaincodeVersion string) (*pb.ChaincodeDeploymentSpec, error) {
  	if existed, _ := ccprovider.ChaincodePackageExists(chaincodeName, chaincodeVersion); existed {
  		return nil, fmt.Errorf("chaincode %s:%s already exists", chaincodeName, chaincodeVersion)
  	}
  
  	spec, err := getChaincodeSpec(cmd)
  	if err != nil {
  		return nil, err
  	}
  
  	cds, err := getChaincodeDeploymentSpec(spec, true)
  	if err != nil {
  		return nil, fmt.Errorf("error getting chaincode code %s: %s", chaincodeName, err)
  	}
  
  	return cds, nil
  }
docs: //genChaincodeDeploymentSpec creates ChaincodeDeploymentSpec as the package to install