mirror of https://github.com/XTLS/Xray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
505 B
27 lines
505 B
package main |
|
|
|
import ( |
|
"fmt" |
|
|
|
"github.com/xtls/xray-core/core" |
|
"github.com/xtls/xray-core/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) |
|
} |
|
}
|
|
|