Skip to content

Commit

Permalink
Tidy-ups.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdee committed Oct 16, 2023
1 parent 958178e commit a5d7547
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ func (s *Service) get2(ctx context.Context, endpoint string) (*httpResponse, err
// require the calling function to be aware that it needs to clode the body
// once it is done with it. To avoid that complexity, we read here and store the
// body as a byte array.
// TODO can we pass the reader? Or does cancelling the request context close the reader?
res.body, err = io.ReadAll(resp.Body)
if err != nil {
span.RecordError(err)
Expand Down Expand Up @@ -393,7 +392,6 @@ func populateContentType(res *httpResponse, resp *http.Response) error {
func metadataFromHeaders(headers map[string]string) map[string]any {
metadata := make(map[string]any)
for k, v := range headers {
// TODO need to be selective here?
metadata[k] = v
}

Expand Down
2 changes: 1 addition & 1 deletion http/voluntaryexitpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestVoluntartExitPool(t *testing.T) {
func TestVoluntaryExitPool(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down

0 comments on commit a5d7547

Please sign in to comment.