]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/progress.go
MTH
[nncp.git] / src / progress.go
index ca1f361a09fbb4e63b26c6b13e72d8013a2d5595..0c2f0ee2c99f7cd874edd56fbded6e815bbdf8d2 100644 (file)
@@ -25,7 +25,7 @@ import (
        "time"
 
        "github.com/dustin/go-humanize"
-       "go.cypherpunks.ru/nncp/v5/uilive"
+       "go.cypherpunks.ru/nncp/v7/uilive"
 )
 
 func init() {
@@ -153,3 +153,13 @@ func Progress(prefix string, les LEs) {
                progressBarsLock.Unlock()
        }
 }
+
+func ProgressKill(pkt string) {
+       progressBarsLock.Lock()
+       pb, exists := progressBars[pkt]
+       if exists {
+               pb.Kill()
+               delete(progressBars, pkt)
+       }
+       progressBarsLock.Unlock()
+}