Skip to content

Commit

Permalink
Fix SDK README example (#325)
Browse files Browse the repository at this point in the history
Fixes the SDK's README and root package doc example by adding  context to the Send method usage.
  • Loading branch information
pedropinheiro75 authored and jasdel committed Jun 25, 2019
1 parent f8fa6e0 commit 76aec52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This example shows how you can use the v2 SDK to make an API request using the S
package main

import (
"context"
"fmt"

"github.com/aws/aws-sdk-go-v2/aws"
Expand Down Expand Up @@ -59,7 +60,7 @@ func main() {
})

// Send the request, and get the response or error back
resp, err := req.Send()
resp, err := req.Send(context.Background())
if err != nil {
panic("failed to describe table, "+err.Error())
}
Expand Down
3 changes: 2 additions & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SDK's Amazon DynamoDB client.
package main
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/endpoints"
"github.com/aws/aws-sdk-go-v2/aws/external"
Expand Down Expand Up @@ -53,7 +54,7 @@ SDK's Amazon DynamoDB client.
})
// Send the request, and get the response or error back
resp, err := req.Send()
resp, err := req.Send(context.Background())
if err != nil {
panic("failed to describe table, "+err.Error())
}
Expand Down

0 comments on commit 76aec52

Please sign in to comment.