Skip to content
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

listBuckets returns struct or array #79

Open
chapmandu opened this issue May 26, 2023 · 1 comment
Open

listBuckets returns struct or array #79

chapmandu opened this issue May 26, 2023 · 1 comment

Comments

@chapmandu
Copy link

This is more a question than an issue, depending on the answer..

Invoking s3.listBuckets(), if there is one bucket the data.Buckets value is a struct, if there is more than one, it's an array.

Is this the expected/desired behaviour?

Thanks!

@jcberquist
Copy link
Owner

Thanks for pointing that out. It should definitely always return an array. The code currently in use for converting XML data doesn't make that distinction, so you can see how in the other list methods check to ensure that what is returned is an array, for example: https://github.com/jcberquist/aws-cfml/blob/master/services/s3.cfc#L67-L72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants