Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
1b371135
Commit
1b371135
authored
Feb 27, 2018
by
Ryan Hitchman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure status bar displays full progress.
parent
800c2f8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
main.go
test/typecheck/main.go
+7
-2
No files found.
test/typecheck/main.go
View file @
1b371135
...
...
@@ -323,9 +323,10 @@ func main() {
if
isTerminal
{
logPrefix
=
"
\r
"
// clear status bar when printing
// Display a status bar so devs can estimate completion times.
wg
.
Add
(
1
)
go
func
()
{
total
:=
len
(
ps
)
*
len
(
c
.
dirs
)
for
proc
:=
0
;
proc
<
total
;
proc
=
int
(
atomic
.
LoadInt64
(
&
processedDirs
))
{
for
proc
:=
0
;
;
proc
=
int
(
atomic
.
LoadInt64
(
&
processedDirs
))
{
work
:=
atomic
.
LoadInt64
(
&
currentWork
)
dir
:=
c
.
dirs
[
work
>>
8
]
platform
:=
ps
[
work
&
0xFF
]
...
...
@@ -333,12 +334,16 @@ func main() {
dir
=
dir
[
:
80
]
}
fmt
.
Printf
(
"
\r
%d/%d
\0
33[2m%-13s
\0
33[0m %-80s"
,
proc
,
total
,
platform
,
dir
)
if
proc
==
total
{
fmt
.
Println
()
break
}
time
.
Sleep
(
50
*
time
.
Millisecond
)
}
wg
.
Done
()
}()
}
wg
.
Wait
()
fmt
.
Println
()
for
_
,
status
:=
range
statuses
{
if
status
!=
0
{
os
.
Exit
(
status
)
...
...
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