4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-21 13:06:47 +00:00

More nice

This commit is contained in:
Neil Alexander
2018-05-23 22:21:37 +01:00
parent 5d87601118
commit cae589d2d3

View File

@ -157,12 +157,12 @@ func main() {
}
case "getSelf":
for k, v := range res["self"].(map[string]interface{}) {
fmt.Println("address:", k)
fmt.Println("IPv6 address:", k)
if subnet, ok := v.(map[string]interface{})["subnet"].(string); ok {
fmt.Println("subnet:", subnet)
fmt.Println("IPv6 subnet:", subnet)
}
if coords, ok := v.(map[string]interface{})["coords"].(string); ok {
fmt.Println("coords:", coords)
fmt.Println("Coords:", coords)
}
}
case "addPeer", "removePeer", "addAllowedEncryptionPublicKey", "removeAllowedEncryptionPublicKey":