More updates for Ygg v0.5

This commit is contained in:
Neil Alexander 2023-03-19 10:33:07 +00:00
parent 83c1a810b5
commit a148f4cfec
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
11 changed files with 46 additions and 44 deletions

View file

@ -165,7 +165,7 @@ func run() int {
table.Append([]string{"Build version:", resp.BuildVersion})
table.Append([]string{"IPv6 address:", resp.IPAddress})
table.Append([]string{"IPv6 subnet:", resp.Subnet})
table.Append([]string{"Coordinates:", fmt.Sprintf("%v", resp.Coords)})
table.Append([]string{"Routing table size:", fmt.Sprintf("%d", resp.RoutingEntries)})
table.Append([]string{"Public key:", resp.PublicKey})
table.Render()
@ -210,12 +210,12 @@ func run() int {
if err := json.Unmarshal(recv.Response, &resp); err != nil {
panic(err)
}
table.SetHeader([]string{"Public Key", "IP Address", "Path"})
table.SetHeader([]string{"Public Key", "IP Address", "Seq"})
for _, p := range resp.Paths {
table.Append([]string{
p.PublicKey,
p.IPAddress,
fmt.Sprintf("%v", p.Path),
fmt.Sprintf("%d", p.Sequence),
})
}
table.Render()