changed back to default print when using IP tables

This commit is contained in:
2021-07-22 14:08:15 +04:00
parent 4e0fd09d73
commit 088c9c5ba4
2 changed files with 13 additions and 12 deletions

View File

@@ -25,22 +25,23 @@ var CliAction = func(ctx *cli.Context) error {
}
// Reads from ip table and passes it
// on to struct print function
Servers, err := p2p.ReadIpTable()
if err != nil {
return err
}
client.PrettyPrint(Servers)
//Servers, err := p2p.ReadIpTable()
//if err != nil {
// return err
//}
//client.PrettyPrint(Servers)
p2p.PrintIpTable()
}
// Displays the IP table
if ServerList {
// Reads from ip table and passes it
// on to struct print function
Servers, err := p2p.ReadIpTable()
if err != nil {
return err
}
client.PrettyPrint(Servers)
//Servers, err := p2p.ReadIpTable()
//if err != nil {
// return err
//}
p2p.PrintIpTable()
}
// Add provided IP to the IP table

View File

@@ -118,9 +118,9 @@ func PrintIpTable() error {
}
for i := 0; i < len(table.IpAddress); i++ {
fmt.Printf("\nIP Address: %s\nIPV6: %s\nLatency: %s\n-----------" +
fmt.Printf("\nIP Address: %s\nIPV6: %s\nLatency: %s\nServerPort: %s\n-----------" +
"-----------------\n",table.IpAddress[i].Ipv4,table.IpAddress[i].Ipv6,
table.IpAddress[i].Latency)
table.IpAddress[i].Latency, table.IpAddress[i].ServerPort)
}
return nil