WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 6df0f3b

Browse files
committed
Remove unused argument
1 parent 1a5d483 commit 6df0f3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

progressbar.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ func (p *ProgressBar) StartHTTPServer(hostPort string) *http.Server {
10641064
// regex matching ansi escape codes
10651065
var ansiRegex = regexp.MustCompile(`\x1b\[[0-9;]*[a-zA-Z]`)
10661066

1067-
func getStringWidth(c config, str string, colorize bool) int {
1067+
func getStringWidth(c config, str string) int {
10681068
if c.colorCodes {
10691069
// convert any color codes in the progress bar into the respective ANSI codes
10701070
str = colorstring.Color(str)
@@ -1210,7 +1210,7 @@ func renderProgressBar(c config, s *state) (int, error) {
12101210
amend += 1 // another space
12111211
}
12121212

1213-
c.width = width - getStringWidth(c, c.description, true) - 10 - amend - sb.Len() - len(leftBrac) - len(rightBrac)
1213+
c.width = width - getStringWidth(c, c.description) - 10 - amend - sb.Len() - len(leftBrac) - len(rightBrac)
12141214
s.currentSaucerSize = int(float64(s.currentPercent) / 100.0 * float64(c.width))
12151215
}
12161216
if (s.currentSaucerSize > 0 || s.currentPercent > 0) && c.theme.BarStartFilled != "" {
@@ -1359,7 +1359,7 @@ func renderProgressBar(c config, s *state) (int, error) {
13591359

13601360
s.rendered = str
13611361

1362-
return getStringWidth(c, str, false), writeString(c, str)
1362+
return getStringWidth(c, str), writeString(c, str)
13631363
}
13641364

13651365
func clearProgressBar(c config, s state) error {

0 commit comments

Comments
 (0)