code: func getChaincodeSpec(cmd *cobra.Command) (*pb.ChaincodeSpec, error) {
  	spec := &pb.ChaincodeSpec{}
  	if err := checkChaincodeCmdParams(cmd); err != nil {
  		// unset usage silence because it's a command line usage error
  		cmd.SilenceUsage = false
  		return spec, err
  	}
  
  	// Build the spec
  	input := &pb.ChaincodeInput{}
  	if err := json.Unmarshal([]byte(chaincodeCtorJSON), &input); err != nil {
  		return spec, errors.Wrap(err, "chaincode argument error")
  	}
  
  	chaincodeLang = strings.ToUpper(chaincodeLang)
  	spec = &pb.ChaincodeSpec{
  		Type:        pb.ChaincodeSpec_Type(pb.ChaincodeSpec_Type_value[chaincodeLang]),
  		ChaincodeId: &pb.ChaincodeID{Path: chaincodePath, Name: chaincodeName, Version: chaincodeVersion},
  		Input:       input,
  	}
  	return spec, nil
  }
docs: // getChaincodeSpec get chaincode spec from the cli cmd pramameters