Merge pull request #53 from Akilan1999/serverports
changed back to default print when using IP tables
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user