downnload and upload speeds commented due to inaccruate results
This commit is contained in:
@@ -82,9 +82,9 @@ func PrintIpTable() error {
|
||||
}
|
||||
|
||||
for i := 0; i < len(table.IpAddress); i++ {
|
||||
fmt.Printf("----------------------\nIP Address: %s\nLatency: %s\nDownload: %f\nUplaod: %f\n-----------" +
|
||||
"-----------\n",table.IpAddress[i].Ipv4,
|
||||
table.IpAddress[i].Latency,table.IpAddress[i].Download,table.IpAddress[i].Upload)
|
||||
fmt.Printf("\nIP Address: %s\nLatency: %s\n-----------" +
|
||||
"-----------------\n",table.IpAddress[i].Ipv4,
|
||||
table.IpAddress[i].Latency)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -20,15 +20,18 @@ func (ip *IpAddresses)SpeedTest() error{
|
||||
}
|
||||
|
||||
//Upload Speed Test
|
||||
err = value.UploadSpeed()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
//err = value.UploadSpeed()
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
//
|
||||
//err = value.DownloadSpeed()
|
||||
//if err != nil {
|
||||
// return err
|
||||
//}
|
||||
|
||||
err = value.DownloadSpeed()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
//Set value to the list
|
||||
ip.IpAddress[i] = value
|
||||
|
||||
}
|
||||
|
||||
@@ -95,7 +98,7 @@ func LocalSpeedTestIpTable() error {
|
||||
}
|
||||
|
||||
// Helper function to remove element from an array of a struct
|
||||
func remove(s []IpAddress, i int) []IpAddress {
|
||||
s[len(s)-1], s[i] = s[i], s[len(s)-1]
|
||||
return s[:len(s)-1]
|
||||
}
|
||||
//func remove(s []IpAddress, i int) []IpAddress {
|
||||
// s[len(s)-1], s[i] = s[i], s[len(s)-1]
|
||||
// return s[:len(s)-1]
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user