mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
chore: fix ui for hashing progressbar
This commit is contained in:
parent
5b6e712bc6
commit
b4e5d0fce0
1 changed files with 3 additions and 0 deletions
|
@ -138,6 +138,7 @@ func HighwayHashFile(fname string, doShowProgress bool) (hashHighway []byte, err
|
||||||
progressbar.OptionShowBytes(true),
|
progressbar.OptionShowBytes(true),
|
||||||
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
||||||
progressbar.OptionClearOnFinish(),
|
progressbar.OptionClearOnFinish(),
|
||||||
|
progressbar.OptionFullWidth(),
|
||||||
)
|
)
|
||||||
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
||||||
return
|
return
|
||||||
|
@ -172,6 +173,7 @@ func MD5HashFile(fname string, doShowProgress bool) (hash256 []byte, err error)
|
||||||
progressbar.OptionShowBytes(true),
|
progressbar.OptionShowBytes(true),
|
||||||
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
||||||
progressbar.OptionClearOnFinish(),
|
progressbar.OptionClearOnFinish(),
|
||||||
|
progressbar.OptionFullWidth(),
|
||||||
)
|
)
|
||||||
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
||||||
return
|
return
|
||||||
|
@ -223,6 +225,7 @@ func XXHashFile(fname string, doShowProgress bool) (hash256 []byte, err error) {
|
||||||
progressbar.OptionShowBytes(true),
|
progressbar.OptionShowBytes(true),
|
||||||
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
||||||
progressbar.OptionClearOnFinish(),
|
progressbar.OptionClearOnFinish(),
|
||||||
|
progressbar.OptionFullWidth(),
|
||||||
)
|
)
|
||||||
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue