mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 10:05:17 +00:00
Tweaks to yggdrasilctl
This commit is contained in:
parent
428d2375da
commit
962665189c
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user