github.com/sqlitebrowser/dio@v0.0.0-20240125125356-b587368e5c6b/cmd/version.go (about) 1 package cmd 2 3 import ( 4 "fmt" 5 6 "github.com/spf13/cobra" 7 ) 8 9 // Displays the version number of dio 10 var versionCmd = &cobra.Command{ 11 Use: "version", 12 Short: "Displays the version of dio being run", 13 RunE: func(cmd *cobra.Command, args []string) error { 14 fmt.Printf("dio version %s\n", DIO_VERSION) 15 return nil 16 }, 17 } 18 19 func init() { 20 RootCmd.AddCommand(versionCmd) 21 }