mirror of
https://github.com/hanzo-fi/webhooks.git
synced 2026-10-30 20:32:55 +00:00
27 lines
475 B
Go
27 lines
475 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
ServiceName = "webhooks"
|
|
Version = "develop"
|
|
BuildDate = "-"
|
|
Commit = "-"
|
|
)
|
|
|
|
func newVersionCommand() *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "version",
|
|
Short: fmt.Sprintf("Get %s version", ServiceName),
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("Version: %s \n", Version)
|
|
fmt.Printf("Date: %s \n", BuildDate)
|
|
fmt.Printf("Commit: %s \n", Commit)
|
|
},
|
|
}
|
|
}
|