WIP: EOL
This commit is contained in:
parent
7ed1e05284
commit
49e05cac10
23 changed files with 613 additions and 253 deletions
21
cmd/version.go
Normal file
21
cmd/version.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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)
|
||||
},
|
||||
}
|
||||
Reference in a new issue