mirror of
https://github.com/Luzifer/share.git
synced 2024-12-20 10:31:16 +00:00
Put progress bar on Stderr
in order to have the URL output pipeable Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
982edcf1e2
commit
f2e3eebbac
1 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mime"
|
"mime"
|
||||||
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
@ -73,6 +74,7 @@ func executeUpload(inFileName string, inFileHandle io.ReadSeeker, useCalculatedF
|
||||||
|
|
||||||
if cfg.Progress {
|
if cfg.Progress {
|
||||||
bar := pb.New64(ps.Size).Prefix(inFileName).SetUnits(pb.U_BYTES)
|
bar := pb.New64(ps.Size).Prefix(inFileName).SetUnits(pb.U_BYTES)
|
||||||
|
bar.Output = os.Stderr
|
||||||
bar.Start()
|
bar.Start()
|
||||||
barUpdate := true
|
barUpdate := true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue