johnmccabe commented on a change in pull request #78: BROOKLYN-586 update br to 
replace obsolete jsonpath package
URL: https://github.com/apache/brooklyn-client/pull/78#discussion_r320486299
 
 

 ##########
 File path: cli/models/catalog.go
 ##########
 @@ -72,28 +76,33 @@ func createTableWithIdentityDetails(item IdentityDetails) 
(terminal.Table) {
 
 func (summary *CatalogItemSummary) Display(c *cli.Context) (err error) {
 
-       if json := c.GlobalString("json") ; json != "" {
-               displayAsJson(summary, json)
+       if json := c.GlobalString("json"); json != "" {
+               raw := c.GlobalBool("raw-output")
+               displayAsJson(summary, json, raw)
        } else {
                summary.displayAsTable()
        }
        return err
 }
 
-
 func (summary *CatalogEntitySummary) Display(c *cli.Context) (err error) {
 
-       if json := c.GlobalString("json") ; json != "" {
-               displayAsJson(summary, json)
+       if json := c.GlobalString("json"); json != "" {
+               raw := c.GlobalBool("raw-output")
+               err := displayAsJson(summary, json, raw)
+               if err != nil {
+                       return fmt.Errorf("display error: %s\n", err)
+               }
        } else {
-               summary.displayAsTable()
+               err := summary.displayAsTable()
+               if err != nil {
+                       return fmt.Errorf("display error: %s\n", err)
+               }
        }
        return err
 }
 
-
-
-func (summary *CatalogItemSummary) displayAsTable() (err error){
+func (summary *CatalogItemSummary) displayAsTable() (err error) {
 
 Review comment:
   Whats the point of the return here, it's always `nil`

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


With regards,
Apache Git Services

Reply via email to