Closed
Description
The use of pointers (string pointers, integer pointers, etc) all over the SDK really goes against how Golang is supposed to be written.
I realize that pointers (or an optional-type) may still need to be used in places where a value or field is optional and the zero-value is actually meaningfully different than a nil pointer. However, the vast majority of the time there is no difference between the zero-value and a nil pointer.
This is really ugly:
svc.PutObjectRequest(&s3.PutObjectInput{
Bucket: aws.String("myBucket"),
Key: aws.String("myKey"),
ACL: s3.ObjectCannedACLPublicRead,
Body: body,
})
It should be:
svc.PutObjectRequest(&s3.PutObjectInput{
Bucket: "myBucket",
Key: "myKey",
ACL: s3.ObjectCannedACLPublicRead,
Body: body,
})