Skip to content

Commit

Permalink
Fix README example not compiling (#2693)
Browse files Browse the repository at this point in the history
Fixes the SDK's README example not compiling due to `cancelFn` not begin compared against nil.
  • Loading branch information
jasdel authored Jul 17, 2019
1 parent afd5069 commit 8598ee2
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 @@ -470,7 +470,7 @@ response.
}
// Ensure the context is canceled to prevent leaking.
// See context package for more information, https://golang.org/pkg/context/
if cancelFn {
if cancelFn != nil {
defer cancelFn()
}

Expand Down

0 comments on commit 8598ee2

Please sign in to comment.