mailout/pkg/cmd/version.go

17 lines
359 B
Go

package cmd
import (
"fmt"
"git.maurice.fr/thomas/mailout/pkg/version"
"github.com/spf13/cobra"
)
var VersionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("mailoutctl %s (%s) built on %s\n", version.Version, version.Commit, version.BuildTime)
},
}