mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-26 07:11:40 +00:00
yggdrasilctl support
This commit is contained in:
parent
7954fa3c33
commit
d253bb750c
@ -296,6 +296,17 @@ func main() {
|
|||||||
fmt.Println("-", v)
|
fmt.Println("-", v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case "dhtping":
|
||||||
|
if _, ok := res["nodes"]; !ok {
|
||||||
|
fmt.Println("No nodes found")
|
||||||
|
} else if res["nodes"] == nil {
|
||||||
|
fmt.Println("No nodes found")
|
||||||
|
} else {
|
||||||
|
for _, v := range res["nodes"].([]interface{}) {
|
||||||
|
m := v.(map[string]interface{})
|
||||||
|
fmt.Println("-", m["key"], m["coords"])
|
||||||
|
}
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
if json, err := json.MarshalIndent(recv["response"], "", " "); err == nil {
|
if json, err := json.MarshalIndent(recv["response"], "", " "); err == nil {
|
||||||
fmt.Println(string(json))
|
fmt.Println(string(json))
|
||||||
|
Loading…
Reference in New Issue
Block a user