Replies: 2 comments 2 replies
-
Thanks for the feeedback. We originally had all the documentation on the interfaces, but moved it for the reasons you mentioned. I'll look at making this change as part of the current refactor work. |
Beta Was this translation helpful? Give feedback.
-
In looking at this, command interfaces breaks down into 2 categories:
While we weren't able to find a reasonable alternative to using the command interfaces, we were able to ensure that we only use those interfaces in cases where polymorphism is needed. We have minimized using them as function return types, except where truly warranted and have preferred concrete return types wherever possible. I think this approach is still in keeping with idiomatic Go, while also providing the flexibility that we need in our testing logic to keep the test framework as simple as possible. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to propose getting rid of (or at least de-emphasizing) all the *Commands interfaces in the GO api, such as GlideClientCommands, BaseClient, or pretty much any other interface they embed.
Having the client constructors return interfaces is not idiomatic Go; the preference is to "accept interfaces but return structs". See https://go.dev/wiki/CodeReviewComments#interfaces
This is problematic for the following reasons
As a piece of prior art experience, the
aws-sdk-go
client defined interfaces for all operations, but the redesignedaws-sdk-go-v2
implementation removed them.Beta Was this translation helpful? Give feedback.
All reactions