Conversation
zomglings
requested changes
Dec 19, 2021
Member
zomglings
left a comment
There was a problem hiding this comment.
@kompotkot : This should be written as a checkenv plugin (see env.go as an example).
Otherwise, I don't even see the point of putting it in this repo.
| // Output: | ||
| // If success, a GetParametersOutput object containing the result of the service call and nil | ||
| // Otherwise, nil and an error from the call to GetParameters | ||
| func ExecGetParameters(c context.Context, api SSMGetParametersAPI, input *ssm.GetParametersInput) (*ssm.GetParametersOutput, error) { |
Member
There was a problem hiding this comment.
This seems like too many layers of indirection. Why not just instantiate a struct with that interface and make the call. What do you gain by having this extra function in the middle?
| // SSMGetParametersAPI and SSMDescribeParametersAPI defines the interface | ||
| // for the GetParameters and DescribeParameters function. | ||
| // We use this interface to test the function using a mocked service | ||
| type SSMGetParametersAPI interface { |
Member
There was a problem hiding this comment.
Do we need to have two different interfaces? Are we going to use them separately? If not, having two interfaces makes the code unnecessarily complicated.
| @@ -0,0 +1,58 @@ | |||
| /* | |||
Member
There was a problem hiding this comment.
Why so much nesting: scripts/sources/parameters/cmd/aws_ssm.go. Can you just put in cmd/aws_ssm/main.go?
Replaced new CLI on "parameters-go" branch with an "aws_ssm" checkenv plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
How to test these changes?
Tested locally
Related issues