mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-06-26 09:25:23 +00:00
* go style commands merge v2ctl commandsw * migrate go style commands to v2ctl * fixes & code optimize * sort the commands * update commands description * restore old proto golang.org proto has removed UnmarshalText, without alternative * add test command * remove unused code * code optimize and fix * The commit simplifies the run and test commands code, * Fixes a hidden issue that the format flag not applied in command "v2ray test -format=pb ..." * fix default loader logic
29 lines
505 B
Go
29 lines
505 B
Go
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"v2ray.com/core"
|
|
"v2ray.com/core/commands/base"
|
|
)
|
|
|
|
// CmdVersion prints V2Ray Versions
|
|
var CmdVersion = &base.Command{
|
|
UsageLine: "{{.Exec}} version",
|
|
Short: "Print V2Ray Versions",
|
|
Long: `Version prints the build information for V2Ray executables.
|
|
`,
|
|
Run: executeVersion,
|
|
}
|
|
|
|
func executeVersion(cmd *base.Command, args []string) {
|
|
printVersion()
|
|
}
|
|
|
|
func printVersion() {
|
|
version := core.VersionStatement()
|
|
for _, s := range version {
|
|
fmt.Println(s)
|
|
}
|
|
}
|