Skip to content

Commit

Permalink
Merge pull request #16 from ma91n/patch-1
Browse files Browse the repository at this point in the history
Fixed a bad implementation mistake in the sample code in the README.
  • Loading branch information
sonatard authored Sep 10, 2024
2 parents 37f6d48 + b039a68 commit 2be241c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func SendWithContext(ctx context.Context, body io.Reader) error {
// Change NewRequest to NewRequestWithContext and pass context it
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "http://example.com", body)
if err != nil {
return nil
return err
}
_, err = http.DefaultClient.Do(req)
if err != nil {
Expand Down

0 comments on commit 2be241c

Please sign in to comment.