-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern for checking API world wide #99
Comments
This API is very weird: https://godoc.org/github.com/aws/aws-sdk-go-v2/aws/endpoints#Partition.Regions A Also the second bool parameter in the return of https://godoc.org/github.com/aws/aws-sdk-go-v2/aws/endpoints#Partitions.ForPartition is really not idiomatic. |
@kaihendry - Second bool parameter being returned can be found in the standard library. See here. I believe this best indicates whether or not something has been found. In addition, what data structure that is returned such as |
Thanks for the link. TIL something new. Though I understand an ENV VAR="" being set as empty. However why would a partition be and why would you need to account for that? I don't quite understand what you mean by aliased. You referenced |
@kaihendry - I referenced the |
@kaihendry Thanks for the feedback. The endpoints#Partition.Regions returns a map to make it easy to determine if a partition includes a region. A partition is an idea like AWS global, AWS China, and AWS GovCloud. Each of these partitions have their own unique set of regions. The reason endpoints#Partitions could be updated to include a For your original linked code example. I'd suggest the following pattern to simplify iterating over the regions, https://play.golang.org/p/6M6Cd9dusm3 |
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. |
Hi, is there a better pattern to use to work out where a service (in my example, medialive) is active?
http://play.golang.org/p/O4MlKjZAP5O
Functions with region endpoints.Region and
cfg.Region = region.ID()
looks ugly to me.The text was updated successfully, but these errors were encountered: