mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-09 04:48:40 +00:00
v1.0.0
This commit is contained in:
parent
47d23e9972
commit
c7f7c08ead
711 changed files with 82154 additions and 2 deletions
main
27
main/version.go
Normal file
27
main/version.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue