ghorg/cmd/version.go
Jay Gabriels ce232f0072
Update/version (#204)
* Create SECURITY.md

* Update version command

* Update CHANGELOG.md
2022-05-29 08:53:47 -07:00

27 lines
416 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
const ghorgVersion = "v1.7.15"
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of Ghorg",
Long: `All software has versions. This is Ghorg's`,
Run: func(cmd *cobra.Command, args []string) {
PrintVersion()
},
}
func PrintVersion() {
fmt.Println(ghorgVersion)
}
func GetVersion() string {
return ghorgVersion
}