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
OpenDAS
ollama
Commits
350aec77
Commit
350aec77
authored
Jul 06, 2023
by
Bruce MacDonald
Committed by
Jeffrey Morgan
Jul 06, 2023
Browse files
clean up unessesary comments
parent
c9f45abe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
cmd/cmd.go
cmd/cmd.go
+2
-6
No files found.
cmd/cmd.go
View file @
350aec77
...
@@ -44,15 +44,11 @@ func run(model string) error {
...
@@ -44,15 +44,11 @@ func run(model string) error {
mutex
.
Lock
()
mutex
.
Lock
()
progressData
=
progress
progressData
=
progress
if
bar
==
nil
{
if
bar
==
nil
{
uiprogress
.
Start
()
// start rendering
uiprogress
.
Start
()
bar
=
uiprogress
.
AddBar
(
int
(
progress
.
Total
))
// Add a new bar
bar
=
uiprogress
.
AddBar
(
int
(
progress
.
Total
))
// display the total file size and how much has downloaded so far
bar
.
PrependFunc
(
func
(
b
*
uiprogress
.
Bar
)
string
{
bar
.
PrependFunc
(
func
(
b
*
uiprogress
.
Bar
)
string
{
return
fmt
.
Sprintf
(
"Downloading: %.2f GB / %.2f GB"
,
bytesToGB
(
progressData
.
Completed
),
bytesToGB
(
progressData
.
Total
))
return
fmt
.
Sprintf
(
"Downloading: %.2f GB / %.2f GB"
,
bytesToGB
(
progressData
.
Completed
),
bytesToGB
(
progressData
.
Total
))
})
})
// display completion percentage
bar
.
AppendFunc
(
func
(
b
*
uiprogress
.
Bar
)
string
{
bar
.
AppendFunc
(
func
(
b
*
uiprogress
.
Bar
)
string
{
return
fmt
.
Sprintf
(
" %d%%"
,
int
((
float64
(
progressData
.
Completed
)
/
float64
(
progressData
.
Total
))
*
100
))
return
fmt
.
Sprintf
(
" %d%%"
,
int
((
float64
(
progressData
.
Completed
)
/
float64
(
progressData
.
Total
))
*
100
))
})
})
...
...
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