File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,14 @@ func (c *Commando) main(ctx *cli.Context, args []string) error {
7575 // rpc or restful call
7676 // aliyun <productCode> <method> --param1 value1
7777 product , _ := c .library .GetProduct (args [0 ])
78- if version , _ := ctx .Flags ().Get ("version" ).GetValue (); version != "" {
79- if style , ok := c .library .GetStyle (productName , version ); ok {
80- product .ApiStyle = style
81- } else {
82- return cli .NewErrorWithTip (fmt .Errorf ("uncheked version %s" , version ),
83- "Please contact the customer support to get more info about API version" )
78+ if product .Code != "" {
79+ if version , _ := ctx .Flags ().Get ("version" ).GetValue (); version != "" {
80+ if style , ok := c .library .GetStyle (productName , version ); ok {
81+ product .ApiStyle = style
82+ } else {
83+ return cli .NewErrorWithTip (fmt .Errorf ("uncheked version %s" , version ),
84+ "Please contact the customer support to get more info about API version" )
85+ }
8486 }
8587 }
8688 if product .ApiStyle == "restful" {
You can’t perform that action at this time.
0 commit comments