mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 16:34:32 +01:00
22 lines
423 B
Go
22 lines
423 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/spf13/cobra"
|
|
"github.com/zrepl/zrepl/version"
|
|
)
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "print version of zrepl binary (for running daemon 'zrepl control version' command)",
|
|
Run: doVersion,
|
|
}
|
|
|
|
func init() {
|
|
RootCmd.AddCommand(versionCmd)
|
|
}
|
|
|
|
func doVersion(cmd *cobra.Command, args []string) {
|
|
fmt.Println(version.NewZreplVersionInformation().String())
|
|
}
|