From 962665189c7d77096b90ef5ea7b3c58293146d9e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 2 Oct 2022 13:15:11 +0100 Subject: [PATCH] Tweaks to `yggdrasilctl` --- cmd/yggdrasilctl/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/yggdrasilctl/main.go b/cmd/yggdrasilctl/main.go index f57ab79a..324550bd 100644 --- a/cmd/yggdrasilctl/main.go +++ b/cmd/yggdrasilctl/main.go @@ -174,16 +174,16 @@ func run() int { if err := json.Unmarshal(recv.Response, &resp); err != nil { panic(err) } - table.SetHeader([]string{"Port", "Public Key", "IP Address", "Peering URI", "Uptime", "RX", "TX"}) + table.SetHeader([]string{"Port", "Public Key", "IP Address", "Uptime", "RX", "TX", "URI"}) for _, peer := range resp.Peers { table.Append([]string{ fmt.Sprintf("%d", peer.Port), peer.PublicKey, peer.IPAddress, - peer.Remote, (time.Duration(peer.Uptime) * time.Second).String(), peer.RXBytes.String(), peer.TXBytes.String(), + peer.Remote, }) } table.Render() @@ -269,6 +269,8 @@ func run() int { } table.Render() + case "addpeer", "removepeer": + default: fmt.Println(string(recv.Response)) }