1
0
Fork 0
This repository has been archived on 2025-08-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
mareshq-backoffice-v2-api/cmd/version.go
2024-05-04 18:21:45 +02:00

21 lines
483 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
"gitlab.mareshq.com/hq/backoffice/backoffice-api/internal/version"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of backoffice backend",
Long: `All software has versions. This is backoffice backend's`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Version: %s (commit: %s)\n", version.Version, version.Commit)
},
}