Skip to content

Commit

Permalink
chore: Add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
PatKoperwas committed Jan 30, 2018
1 parent 4d44d4d commit a30a4b6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cmd/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cmd

import (
"fmt"

"github.com/spf13/cobra"
)

var version = "master"

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

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

0 comments on commit a30a4b6

Please sign in to comment.