goamz icon indicating copy to clipboard operation
goamz copied to clipboard

[SQS] Pointer usage inconsistency

Open ORBAT opened this issue 10 years ago • 2 comments

(This is more or less a copy of goamz/goamz#62)

The use of pointers in crowdmob/sqs is a bit inconsistent: e.g. there's a func(*SQS) DeleteMessage(*Message), but messages are handed to the user as []Message, Error has func (err *Error) Error() but xmlErrors contains Error values etc. sqs_test.go also had the downright mysterious []Message{*(&Message{…}), …} construct where the pointer is immediately dereferenced.

I made pointer usage more consistent (see here), and while I was at it I cleaned up DeleteMessageBatch so it doesn't do completely unnecessary allocation of a map and slice. I can turn this into a PR if needed, and any comments are welcome.

ORBAT avatar Jan 22 '15 22:01 ORBAT

Turns out there's a lot more wrong with the SQS package than just a few pointer inconsistencies (requests&responses not being up to spec, V2/V4 signature craziness), so this issue is more or less cosmetic

ORBAT avatar Jan 26 '15 21:01 ORBAT

We still appreciate your pull requests :)

alimoeeny avatar Jan 27 '15 00:01 alimoeeny