mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +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.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
||||
progressbar.OptionClearOnFinish(),
|
||||
progressbar.OptionFullWidth(),
|
||||
)
|
||||
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
||||
return
|
||||
|
@ -172,6 +173,7 @@ func MD5HashFile(fname string, doShowProgress bool) (hash256 []byte, err error)
|
|||
progressbar.OptionShowBytes(true),
|
||||
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
||||
progressbar.OptionClearOnFinish(),
|
||||
progressbar.OptionFullWidth(),
|
||||
)
|
||||
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
||||
return
|
||||
|
@ -223,6 +225,7 @@ func XXHashFile(fname string, doShowProgress bool) (hash256 []byte, err error) {
|
|||
progressbar.OptionShowBytes(true),
|
||||
progressbar.OptionSetDescription(fmt.Sprintf("Hashing %s", fnameShort)),
|
||||
progressbar.OptionClearOnFinish(),
|
||||
progressbar.OptionFullWidth(),
|
||||
)
|
||||
if _, err = io.Copy(io.MultiWriter(h, bar), f); err != nil {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue