feat: version command (#6)
Version v0.1 Reviewed-on: #6 Co-authored-by: bdoerfchen <git@bissendorf.co> Co-committed-by: bdoerfchen <git@bissendorf.co>
This commit is contained in:
16
cmd/version.go
Normal file
16
cmd/version.go
Normal file
@ -0,0 +1,16 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.bissendorf.co/bissendorf/unifood/m/v2/util"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var versionCmd = cobra.Command{
|
||||
Use: "version",
|
||||
Aliases: []string{"v"},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println(util.AppVersion)
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user