(cmd *cobra.Command, version string)
| 52 | } |
| 53 | |
| 54 | func versionCommand(cmd *cobra.Command, version string) error { |
| 55 | info := newVersionOutput(version) |
| 56 | return commandOutput(cmd).Render(func(w io.Writer) error { |
| 57 | return renderVersion(w, info) |
| 58 | }, withJSONCommand(cmd, newVersionOperationOutput(info))) |
| 59 | } |
| 60 | |
| 61 | func renderVersion(out io.Writer, info versionOutput) error { |
| 62 | fmt.Fprintln(out, "dbxcli version:", info.Version) |