Fix linter issues

This commit is contained in:
Finn 2021-01-30 22:28:59 -08:00
parent ddac6f183d
commit 9284d35b80
3 changed files with 0 additions and 9 deletions

View file

@ -62,13 +62,11 @@ var (
if err != nil { if err != nil {
log.Fatal(err, "error encoding response to stdout") log.Fatal(err, "error encoding response to stdout")
} }
break
case "yaml": case "yaml":
err := yaml.NewEncoder(os.Stdout).Encode(accounts) err := yaml.NewEncoder(os.Stdout).Encode(accounts)
if err != nil { if err != nil {
log.Fatal(err, "error encoding response to stdout") log.Fatal(err, "error encoding response to stdout")
} }
break
case "table": case "table":
t := table.NewWriter() t := table.NewWriter()
t.SetOutputMirror(os.Stdout) t.SetOutputMirror(os.Stdout)
@ -79,7 +77,6 @@ var (
} }
t.Render() t.Render()
break
default: default:
log.Fatal("Unsupported output format") log.Fatal("Unsupported output format")
} }

View file

@ -72,13 +72,11 @@ var (
if err != nil { if err != nil {
log.Fatal(err, "error encoding response to stdout") log.Fatal(err, "error encoding response to stdout")
} }
break
case "yaml": case "yaml":
err := yaml.NewEncoder(os.Stdout).Encode(resp) err := yaml.NewEncoder(os.Stdout).Encode(resp)
if err != nil { if err != nil {
log.Fatal(err, "error encoding response to stdout") log.Fatal(err, "error encoding response to stdout")
} }
break
case "table": case "table":
t := table.NewWriter() t := table.NewWriter()
t.SetOutputMirror(os.Stdout) t.SetOutputMirror(os.Stdout)
@ -93,7 +91,6 @@ var (
} }
t.Render() t.Render()
break
default: default:
log.Fatal("Unsupported output format") log.Fatal("Unsupported output format")
} }

View file

@ -56,13 +56,11 @@ var versionCmd = &cobra.Command{
if err != nil { if err != nil {
log.Fatal(err, "error encoding response to stdout") log.Fatal(err, "error encoding response to stdout")
} }
break
case "yaml": case "yaml":
err := yaml.NewEncoder(os.Stdout).Encode(output) err := yaml.NewEncoder(os.Stdout).Encode(output)
if err != nil { if err != nil {
log.Fatal(err, "error encoding response to stdout") log.Fatal(err, "error encoding response to stdout")
} }
break
case "table": case "table":
t := table.NewWriter() t := table.NewWriter()
t.SetOutputMirror(os.Stdout) 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{common.Name, common.Version, common.Branch, common.Commit})
t.AppendRow(table.Row{response.Name, response.Version, response.Branch, response.Commit}) t.AppendRow(table.Row{response.Name, response.Version, response.Branch, response.Commit})
t.Render() t.Render()
break
default: default:
log.Fatal("Unsupported output format") log.Fatal("Unsupported output format")
} }