Skip to content

Commit

Permalink
Test waiting for go routine
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Nov 9, 2023
1 parent 0aa91c2 commit 6e5a8dd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions providers/asrockrack/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,13 @@ func (a *ASRockRack) uploadFirmware(ctx context.Context, endpoint string, fwRead
"Content-Type": form.FormDataContentType(),
}

mybytes, err := io.ReadAll(pipeReader)
mystring := string(mybytes[:])
return fmt.Errorf("data: %s", mystring)
rc := <-errCh

Check failure on line 263 in providers/asrockrack/helpers.go

View workflow job for this annotation

GitHub Actions / test

rc declared but not used

Check failure on line 263 in providers/asrockrack/helpers.go

View workflow job for this annotation

GitHub Actions / lint

rc declared and not used (typecheck)

//mybytes, err := io.ReadAll(pipeReader)
//if len(mybytes) < 1000 {
// mystring := string(mybytes[:])
// return fmt.Errorf("data: %s", mystring)
//}

// POST payload
_, statusCode, err := a.queryHTTPS(ctx, endpoint, "POST", pipeReader, headers, contentLength)
Expand Down

0 comments on commit 6e5a8dd

Please sign in to comment.