mirror of
https://github.com/gabrie30/ghorg.git
synced 2025-08-06 06:17:09 +02:00
27 lines
416 B
Go
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
|
|
}
|