Skip to content

Commit

Permalink
chore: fix ui for hashing progressbar
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jan 2, 2025
1 parent 5b6e712 commit b4e5d0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b4e5d0f

Please sign in to comment.