Skip to content

Commit 9e10498

Browse files
committed
fix(printer) make TestPromptForPassword compatible with older go versions
1 parent 924c7e2 commit 9e10498

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/pkg/print/print_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,9 +977,11 @@ func TestPromptForPassword(t *testing.T) {
977977
var pw string
978978
var err error
979979
var wg sync.WaitGroup
980-
wg.Go(func() {
980+
go func() {
981+
wg.Add(1)
981982
pw, err = p.PromptForPassword("Enter password: ")
982-
})
983+
wg.Done()
984+
}()
983985
w.Write([]byte(tt.input))
984986
wg.Wait()
985987
if err != nil {

0 commit comments

Comments
 (0)