reflector.go/cmd/version.go
Alex Grintsvayg 5f9db51d67 add version
2018-08-15 10:34:50 -04:00

22 lines
339 B
Go

package cmd
import (
"log"
"github.com/lbryio/reflector.go/meta"
"github.com/spf13/cobra"
)
func init() {
var cmd = &cobra.Command{
Use: "version",
Short: "Print the version",
Run: versionCmd,
}
rootCmd.AddCommand(cmd)
}
func versionCmd(cmd *cobra.Command, args []string) {
log.Printf("version %s\n", meta.Version)
}