code: func packageCmd(cf *ChaincodeCmdFactory, cdsFact ccDepSpecFactory) *cobra.Command {
  	chaincodePackageCmd = &cobra.Command{
  		Use:       "package",
  		Short:     packageDesc,
  		Long:      packageDesc,
  		ValidArgs: []string{"1"},
  		RunE: func(cmd *cobra.Command, args []string) error {
  			if len(args) != 1 {
  				return fmt.Errorf("output file not specified or invalid number of args (filename should be the only arg)")
  			}
  			//UT will supply its own mock factory
  			if cdsFact == nil {
  				cdsFact = defaultCDSFactory
  			}
  			return chaincodePackage(cmd, args, cdsFact, cf)
  		},
  	}
  	flagList := []string{
  		"lang",
  		"ctor",
  		"path",
  		"name",
  		"version",
  	}
  	attachFlags(chaincodePackageCmd, flagList)
  
  	chaincodePackageCmd.Flags().BoolVarP(&createSignedCCDepSpec, "cc-package", "s", false, "create CC deployment spec for owner endorsements instead of raw CC deployment spec")
  	chaincodePackageCmd.Flags().BoolVarP(&signCCDepSpec, "sign", "S", false, "if creating CC deployment spec package for owner endorsements, also sign it with local MSP")
  	chaincodePackageCmd.Flags().StringVarP(&instantiationPolicy, "instantiate-policy", "i", "", "instantiation policy for the chaincode")
  
  	return chaincodePackageCmd
  }
docs: // deployCmd returns the cobra command for Chaincode Deploy