This commit is contained in:
suyl
2021-07-21 14:30:08 +08:00
parent b5355149e7
commit 7aabe0b988
3 changed files with 4 additions and 5 deletions

View File

@@ -229,9 +229,9 @@ func Flow2KB(flow float64, unit string) (flowKB float64) {
if unit == "KB" {
return flow
} else if unit == "MB" {
return flow * 1024
return flow * float64(1024)
} else if unit == "GB" {
return flow * 1024 * 1024
return flow * float64(1024) * float64(1024)
}
return flowKB
}