Skip to content

Commit

Permalink
Fixup example documentation for region constants
Browse files Browse the repository at this point in the history
Fixes aws#557 by removing out dated example documentation from the SDK's
endpoints package and README. The feature to enumerate regions and
services was removed in aws#512 pending further design and development of
service specific endpoint metadata.
  • Loading branch information
jasdel committed Jun 17, 2020
1 parent cdf53db commit 4e45731
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func main() {
}

// Set the AWS Region that the service clients should use
cfg.Region = endpoints.UsWest2RegionID
cfg.Region = "us-west-2"

// Using the Config value, create the DynamoDB client
svc := dynamodb.New(cfg)
Expand Down
24 changes: 0 additions & 24 deletions aws/endpoints/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,6 @@
// endpoint if one is found. The default resolver will search all partitions
// known by the SDK. e.g AWS Standard (aws), AWS China (aws-cn), and
// AWS GovCloud (US) (aws-us-gov).
// .
//
// Enumerating Regions and Endpoint Metadata
//
// Casting the Resolver returned by DefaultResolver to a EnumPartitions interface
// will allow you to get access to the list of underlying Partitions with the
// Partitions method. This is helpful if you want to limit the SDK's endpoint
// resolving to a single partition, or enumerate regions, services, and endpoints
// in the partition.
//
// resolver := endpoints.NewDefaultResolver()
// partitions := resolver.Partitions()
//
// for _, p := range partitions {
// fmt.Println("Regions for", p.ID())
// for id, _ := range p.Regions() {
// fmt.Println("*", id)
// }
//
// fmt.Println("Services for", p.ID())
// for id, _ := range p.Services() {
// fmt.Println("*", id)
// }
// }
//
// Using Custom Endpoints
//
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SDK's Amazon DynamoDB client.
}
// Set the AWS Region that the service clients should use
cfg.Region = endpoints.UsWest2RegionID
cfg.Region = "us-west-2"
// Using the Config value, create the DynamoDB client
svc := dynamodb.New(cfg)
Expand Down

0 comments on commit 4e45731

Please sign in to comment.