You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/09/25 18:03:25 UTC

[GitHub] dlee-rt commented on a change in pull request #98: res - remove type from res commands

dlee-rt commented on a change in pull request #98: res - remove type from res commands
URL: https://github.com/apache/mynewt-newtmgr/pull/98#discussion_r220296403
 
 

 ##########
 File path: newtmgr/cli/res.go
 ##########
 @@ -259,12 +240,7 @@ func resDeleteCmd(cmd *cobra.Command, args []string) {
 		nmUsage(nil, err)
 	}
 
-	rt, err := sesn.ParseResType(args[0])
-	if err != nil {
-		nmUsage(cmd, err)
-	}
-
-	path := args[1]
+	path := args[0]
 
 	var m map[string]interface{}
 	m, err = extractResKv(args[2:])
 
 Review comment:
   Previously, type was in args[0], so with the removal of type, path is in args[0]. Since the other args would include key-value pairs, shouldn't they be excluded from the path? Also, path is passed as a string, and won't accept a string slice in assignment. I got the following errors when making the change: 
   
   cli/res.go:198:9: cannot use path (type []string) as type string in assignment
   cli/res.go:243:9: cannot use path (type []string) as type string in assignment

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services