mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 06:05:06 +03:00
Implement feature from https://github.com/yggdrasil-network/yggdrasil-go/issues/488
This commit is contained in:
parent
ae05683c73
commit
589ad638ea
8 changed files with 47 additions and 33 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
|
||||
"github.com/hjson/hjson-go"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/defaults"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/version"
|
||||
)
|
||||
|
||||
type admin_info map[string]interface{}
|
||||
|
@ -53,9 +54,17 @@ func main() {
|
|||
server := flag.String("endpoint", endpoint, "Admin socket endpoint")
|
||||
injson := flag.Bool("json", false, "Output in JSON format (as opposed to pretty-print)")
|
||||
verbose := flag.Bool("v", false, "Verbose output (includes public keys)")
|
||||
ver := flag.Bool("version", false, "Prints the version of this build")
|
||||
flag.Parse()
|
||||
args := flag.Args()
|
||||
|
||||
if *ver {
|
||||
fmt.Println(os.Args[0], "build name:", version.BuildName())
|
||||
fmt.Println(os.Args[0], "version:", version.BuildVersion())
|
||||
fmt.Println("\nFor get yggdrasil version use\n - ", os.Args[0], "getSelf")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if len(args) == 0 {
|
||||
flag.Usage()
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue