Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
orangecat
ollama
Commits
f2113c1f
"...models/git@developer.sourcefind.cn:OpenDAS/lmdeploy.git" did not exist on "22e8b2ca2b38ff924ca1cbf82ae7e34b51d1d61a"
Commit
f2113c1f
authored
Nov 21, 2023
by
Jeffrey Morgan
Browse files
fix potential error in progress bar calculation
parent
6452e2ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
progress/bar.go
progress/bar.go
+4
-1
No files found.
progress/bar.go
View file @
f2113c1f
...
@@ -95,7 +95,10 @@ func (b *Bar) String() string {
...
@@ -95,7 +95,10 @@ func (b *Bar) String() string {
}
}
// 44 is the maximum width for the stats on the right of the progress bar
// 44 is the maximum width for the stats on the right of the progress bar
suf
.
WriteString
(
strings
.
Repeat
(
" "
,
44
-
suf
.
Len
()
-
len
(
timing
)))
pad
:=
44
-
suf
.
Len
()
-
len
(
timing
)
if
pad
>
0
{
suf
.
WriteString
(
strings
.
Repeat
(
" "
,
pad
))
}
suf
.
WriteString
(
timing
)
suf
.
WriteString
(
timing
)
// add 3 extra spaces: 2 boundary characters and 1 space at the end
// add 3 extra spaces: 2 boundary characters and 1 space at the end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment