Skip to content

Commit 5337e69

Browse files
author
Florian
committed
Removed StopConfirmedChannel
1 parent aceb00c commit 5337e69

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

pkg/util/log/loading_text.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ type loadingText struct {
1414
Stream io.Writer
1515
Message string
1616

17-
startTimestamp int64
18-
loadingRune int
19-
isShown bool
20-
stopChan chan bool
21-
stopConfirmedChan chan bool
17+
startTimestamp int64
18+
loadingRune int
19+
isShown bool
20+
stopChan chan bool
2221
}
2322

2423
func (l *loadingText) Start() {
@@ -28,17 +27,13 @@ func (l *loadingText) Start() {
2827
if l.stopChan == nil {
2928
l.stopChan = make(chan bool)
3029
}
31-
if l.stopConfirmedChan == nil {
32-
l.stopConfirmedChan = make(chan bool)
33-
}
3430

3531
go func() {
3632
l.render()
3733

3834
for {
3935
select {
4036
case <-l.stopChan:
41-
l.stopConfirmedChan <- true
4237
return
4338
case <-time.After(waitInterval):
4439
l.render()
@@ -87,7 +82,6 @@ func (l *loadingText) render() {
8782

8883
func (l *loadingText) Stop() {
8984
l.stopChan <- true
90-
<-l.stopConfirmedChan
9185
l.Stream.Write([]byte("\r"))
9286

9387
messageLength := len(l.Message) + 20

0 commit comments

Comments
 (0)