Discuss you're experiences and questions with the Developer Preview AWS SDK for Go v2
@kaihendry thanks for sharing. Minor feedback i'd have is the suggestion of instead of using two different endpoints /listhtml
and /listjson
use the same endpoint e.g. /list
and either use the Accept-Encoding
request header to determine the requested format, or use an extension on the resource like /list.json
. Mainly this suggestion is just for simplicity of the API given the two endpoints really do the same thing just output formatted differently.
Here is a common example, https://reddit.com/r/aws
will return HTML whereas https://reddit.com/r/aws.json
will return json data. Reddit only supports the ".json" extension method, though. But would be nice to support at least one of the two patterns.
req
variable name as shorthand for the returned request value. You're correct that when using two examples within the same function one of the two's req
variable name will need to be updated to an alternative name. in your example something like pubReq
.
params := &organizations.ListAccountsInput{MaxResults:int64(100)}
aws.ResolveWithEndpointURL
utility to wrap your URL for media convert when creating the client. https://godoc.org/github.com/aws/aws-sdk-go-v2/aws#ResolveWithEndpointURL
mediaconvert.DescribeEndpointsRequest
https://godoc.org/github.com/aws/aws-sdk-go-v2/service/mediaconvert#DescribeEndpointsRequest.Send?
ResolveWithEndpointURL
. Also if you have feedback on the naming of that helper please let us know. The aws
package is kind of large and might be hard to find some things if not named well.