mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-29 10:28:53 +01:00
23 lines
424 B
Go
23 lines
424 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())
|
|
}
|
|
|