Skip to content

Commit

Permalink
Changed refs for session.New to session.NewSession (aws#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickard-von-essen authored and xibz committed Oct 24, 2016
1 parent 32cdc88 commit f6f2070
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ If you are using Go 1.5 with the `GO15VENDOREXPERIMENT=1` vendoring flag, or 1.6

go get -u github.com/aws/aws-sdk-go

Otherwise if your Go environment does not have vendoring support enabled, or you do not want to include the vendored SDK's dependencies you can use the following command to retrieve the SDK and its non-testing dependencies using `go get`.
Otherwise if your Go environment does not have vendoring support enabled, or you do not want to include the vendored SDK's dependencies you can use the following command to retrieve the SDK and its non-testing dependencies using `go get`.

go get -u github.com/aws/aws-sdk-go/aws/...
go get -u github.com/aws/aws-sdk-go/service/...

If you're looking to retrieve just the SDK without any dependencies use the following command.

go get -d github.com/aws/aws-sdk-go/

These two processes will still include the `vendor` folder and it should be deleted if its not going to be used by your environment.

rm -rf $GOPATH/src/github.com/aws/aws-sdk-go/vendor
Expand Down Expand Up @@ -87,7 +87,7 @@ func main() {
// Create an EC2 service object in the "us-west-2" region
// Note that you can also configure your region globally by
// exporting the AWS_REGION environment variable
svc := ec2.New(session.New(), &aws.Config{Region: aws.String("us-west-2")})
svc := ec2.New(session.NewSession(), &aws.Config{Region: aws.String("us-west-2")})

// Call the DescribeInstances Operation
resp, err := svc.DescribeInstances(nil)
Expand Down
2 changes: 1 addition & 1 deletion aws/session/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ through code instead of being driven by environment variables only.
Use NewSessionWithOptions when you want to provide the config profile, or
override the shared config state (AWS_SDK_LOAD_CONFIG).
// Equivalent to session.New
// Equivalent to session.NewSession()
sess, err := session.NewSessionWithOptions(session.Options{})
// Specify profile to load for the session's config
Expand Down

0 comments on commit f6f2070

Please sign in to comment.