aboutsummaryrefslogtreecommitdiffstats
path: root/commands/show.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/show.go')
-rw-r--r--commands/show.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/commands/show.go b/commands/show.go
index bc898241..0b5585f1 100644
--- a/commands/show.go
+++ b/commands/show.go
@@ -83,8 +83,6 @@ func runShowBug(cmd *cobra.Command, args []string) error {
)
}
} else {
- unknownFields:=""
- err:=false
for _, field := range showFieldsQuery {
switch field {
case "author": fmt.Printf("%s ",firstComment.Author.DisplayName())
@@ -98,14 +96,10 @@ func runShowBug(cmd *cobra.Command, args []string) error {
case "status": fmt.Printf("%s ",snapshot.Status)
case "title": fmt.Printf("%s ",snapshot.Title)
default:
- unknownFields+=field+" "
- err=true
+ return fmt.Errorf("\nUnsupported field: %s\n",field)
}
}
fmt.Printf("\n")
- if err {
- return fmt.Errorf("Unsupported fields requested: %s\n",unknownFields)
- }
}
return nil