mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 18:17:52 -05:00
ff59bd37ce
* scalable commands column * new multi-json loader For both internal & external json loader This commit also: * applies -confdir to other formats, e.g. "yaml" in the future * multiple assign of -confdir is accepted * add flag to load confdir recursively * config loader can have alias name * json loader also accepts .jsonc * add merge command * add help topics for json merge, format loader * format loaders don't panic * apply lint style * add merge test * merge same tag in array, solve v2fly/discussion#97 * apply lint style * merge code optimize * fix merge cmdarg.Arg * update cmd description * improve merge logic * fix zero value overwrite * fix "null" lost after array merge * code optimize * fix merged slices not sorted * code optimize * add package doc * fix a typo
29 lines
485 B
Go
29 lines
485 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: `Prints the build information for V2Ray.
|
|
`,
|
|
Run: executeVersion,
|
|
}
|
|
|
|
func executeVersion(cmd *base.Command, args []string) {
|
|
printVersion()
|
|
}
|
|
|
|
func printVersion() {
|
|
version := core.VersionStatement()
|
|
for _, s := range version {
|
|
fmt.Println(s)
|
|
}
|
|
}
|