mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-07 21:09:53 +00:00
28 lines
432 B
Go
28 lines
432 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
version = "0.9.5"
|
|
codename = "XrayR"
|
|
intro = "A Xray backend that supports many panels"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(&cobra.Command{
|
|
Use: "version",
|
|
Short: "Print current version of XrayR",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
showVersion()
|
|
},
|
|
})
|
|
}
|
|
|
|
func showVersion() {
|
|
fmt.Printf("%s %s (%s) \n", codename, version, intro)
|
|
}
|