mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-05 04:29:19 +02:00
28 lines
511 B
Go
28 lines
511 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/xtls/xray-core/v1/core"
|
||
|
"github.com/xtls/xray-core/v1/main/commands/base"
|
||
|
)
|
||
|
|
||
|
var cmdVersion = &base.Command{
|
||
|
UsageLine: "{{.Exec}} version",
|
||
|
Short: "Show current version of Xray",
|
||
|
Long: `Version prints the build information for Xray executables.
|
||
|
`,
|
||
|
Run: executeVersion,
|
||
|
}
|
||
|
|
||
|
func executeVersion(cmd *base.Command, args []string) {
|
||
|
printVersion()
|
||
|
}
|
||
|
|
||
|
func printVersion() {
|
||
|
version := core.VersionStatement()
|
||
|
for _, s := range version {
|
||
|
fmt.Println(s)
|
||
|
}
|
||
|
}
|