This is an automated email from the git hooks/post-receive script.

cohosh pushed a commit to branch main
in repository pluggable-transports/snowflake.

The following commit(s) were added to refs/heads/main by this push:
     new 3185487  update formatTraffic so that bandwidth unit is always KB
3185487 is described below

commit 3185487aea4efcdfd70812222b1bd005e270242b
Author: luciole <[email protected]>
AuthorDate: Thu Nov 10 15:12:46 2022 +0100

    update formatTraffic so that bandwidth unit is always KB
---
 proxy/lib/util.go | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/proxy/lib/util.go b/proxy/lib/util.go
index c7b3684..c444bb0 100644
--- a/proxy/lib/util.go
+++ b/proxy/lib/util.go
@@ -84,16 +84,4 @@ func (b *bytesSyncLogger) ThroughputSummary() string {
 
 func (b *bytesSyncLogger) GetStat() (in int, out int) { return b.inbound, 
b.outbound }
 
-func formatTraffic(amount int) (value int, unit string) {
-       value = amount
-       units := []string{"B", "KB", "MB", "GB"}
-       for i, u := range units {
-               unit = u
-               if (value < 1000) || (i == len(units)-1) {
-                       break
-               }
-               value = value / 1000
-       }
-       return
-
-}
+func formatTraffic(amount int) (value int, unit string) { return amount / 
1000, "KB" }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to