Skip to content

Commit

Permalink
feat: add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrgl committed Jul 23, 2022
1 parent 655edef commit 4a6508c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cmd/version.go
@@ -0,0 +1,25 @@
package cmd

import (
"fmt"

"github.com/spf13/cobra"
)

const (
version = "0.0.1"
)

var (
versionCmd = &cobra.Command{
Use: "version",
Short: "Print Gameover version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("v%s\n", version)
},
}
)

func init() {
rootCmd.AddCommand(versionCmd)
}

0 comments on commit 4a6508c

Please sign in to comment.