22 lines
358 B
Go
22 lines
358 B
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// Version of the tongo application.
|
|
const Version = "0.1.0"
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the Tongo Core version",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("Tongo Core v%s\n", Version)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|