File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -966,8 +966,8 @@ func TestPromptForPassword(t *testing.T) {
966966 cmd := & cobra.Command {}
967967 r , w := io .Pipe ()
968968 defer func () {
969- r .Close ()
970- w .Close ()
969+ r .Close () //nolint:errcheck // ignore error on close
970+ w .Close () //nolint:errcheck // ignore error on close
971971 }()
972972 cmd .SetIn (r )
973973 p := & Printer {
@@ -977,12 +977,12 @@ func TestPromptForPassword(t *testing.T) {
977977 var pw string
978978 var err error
979979 var wg sync.WaitGroup
980+ wg .Add (1 )
980981 go func () {
981- wg .Add (1 )
982982 pw , err = p .PromptForPassword ("Enter password: " )
983983 wg .Done ()
984984 }()
985- w .Write ([]byte (tt .input ))
985+ w .Write ([]byte (tt .input )) //nolint:errcheck // ignore error
986986 wg .Wait ()
987987 if err != nil {
988988 t .Fatalf ("unexpected error: %v" , err )
You can’t perform that action at this time.
0 commit comments