diff options
Diffstat (limited to 'cmd/version.go')
| -rw-r--r-- | cmd/version.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd/version.go b/cmd/version.go new file mode 100644 index 0000000..bdb3331 --- /dev/null +++ b/cmd/version.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "fmt" + + "git.db.org.ai/dborg/internal/utils" + "github.com/spf13/cobra" +) + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Print the version number of dborg", + Long: `Display the current version of the dborg CLI`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("dborg version %s\n", utils.Version) + }, +} + +func init() { + rootCmd.AddCommand(versionCmd) +} |
