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 {
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")
}

View file

@ -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")
}

View file

@ -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")
}