From 9284d35b80a6eafc2369840c797cc5ee163c33a1 Mon Sep 17 00:00:00 2001 From: Finn Date: Sat, 30 Jan 2021 22:28:59 -0800 Subject: [PATCH] Fix linter issues --- cmd/signaldctl/cmd/get/account/account.go | 3 --- cmd/signaldctl/cmd/get/group/group.go | 3 --- cmd/signaldctl/cmd/version.go | 3 --- 3 files changed, 9 deletions(-) diff --git a/cmd/signaldctl/cmd/get/account/account.go b/cmd/signaldctl/cmd/get/account/account.go index e58634c..80c53d0 100644 --- a/cmd/signaldctl/cmd/get/account/account.go +++ b/cmd/signaldctl/cmd/get/account/account.go @@ -62,13 +62,11 @@ var ( if err != nil { log.Fatal(err, "error encoding response to stdout") } - break case "yaml": err := yaml.NewEncoder(os.Stdout).Encode(accounts) if err != nil { log.Fatal(err, "error encoding response to stdout") } - break case "table": t := table.NewWriter() t.SetOutputMirror(os.Stdout) @@ -79,7 +77,6 @@ var ( } t.Render() - break default: log.Fatal("Unsupported output format") } diff --git a/cmd/signaldctl/cmd/get/group/group.go b/cmd/signaldctl/cmd/get/group/group.go index 3657b9e..5dd5f1b 100644 --- a/cmd/signaldctl/cmd/get/group/group.go +++ b/cmd/signaldctl/cmd/get/group/group.go @@ -72,13 +72,11 @@ var ( if err != nil { log.Fatal(err, "error encoding response to stdout") } - break case "yaml": err := yaml.NewEncoder(os.Stdout).Encode(resp) if err != nil { log.Fatal(err, "error encoding response to stdout") } - break case "table": t := table.NewWriter() t.SetOutputMirror(os.Stdout) @@ -93,7 +91,6 @@ var ( } t.Render() - break default: log.Fatal("Unsupported output format") } diff --git a/cmd/signaldctl/cmd/version.go b/cmd/signaldctl/cmd/version.go index f020491..855a82e 100644 --- a/cmd/signaldctl/cmd/version.go +++ b/cmd/signaldctl/cmd/version.go @@ -56,13 +56,11 @@ var versionCmd = &cobra.Command{ if err != nil { log.Fatal(err, "error encoding response to stdout") } - break case "yaml": err := yaml.NewEncoder(os.Stdout).Encode(output) if err != nil { log.Fatal(err, "error encoding response to stdout") } - break case "table": t := table.NewWriter() t.SetOutputMirror(os.Stdout) @@ -70,7 +68,6 @@ var versionCmd = &cobra.Command{ t.AppendRow(table.Row{common.Name, common.Version, common.Branch, common.Commit}) t.AppendRow(table.Row{response.Name, response.Version, response.Branch, response.Commit}) t.Render() - break default: log.Fatal("Unsupported output format") }