-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Cross Account - sourceArn #19
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @clark42, much appreciated!
@@ -29,6 +29,9 @@ var ( | |||
user = flag.String("u", "", "Authentication username") | |||
allowFrom = flag.String("l", "", "Allowed sender emails regular expression") | |||
denyTo = flag.String("d", "", "Denied recipient emails regular expression") | |||
sourceArn = flag.String("f", "", "The SourceARN (when using with cross accounts) ") | |||
fromArn = flag.String("o", "", "The FromARN (when using with cross accounts)") | |||
rPathArn = flag.String("p", "", "The ReturnPathARN (when using with cross accounts)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, we should call this variable returnPathArn
.
@@ -29,6 +29,9 @@ var ( | |||
user = flag.String("u", "", "Authentication username") | |||
allowFrom = flag.String("l", "", "Allowed sender emails regular expression") | |||
denyTo = flag.String("d", "", "Denied recipient emails regular expression") | |||
sourceArn = flag.String("f", "", "The SourceARN (when using with cross accounts) ") | |||
fromArn = flag.String("o", "", "The FromARN (when using with cross accounts)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would switch the flags for sourceArn
and fromArn
, since f
is better associated with from
.
@@ -29,6 +29,9 @@ var ( | |||
user = flag.String("u", "", "Authentication username") | |||
allowFrom = flag.String("l", "", "Allowed sender emails regular expression") | |||
denyTo = flag.String("d", "", "Denied recipient emails regular expression") | |||
sourceArn = flag.String("f", "", "The SourceARN (when using with cross accounts) ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would change the description of all three flags to the following (for consistency with setName
):
- Amazon SES SourceARN
- Amazon SES FromARN
- Amazon SES ReturnPathARN
} | ||
if *rPathArn == "" { | ||
rPathArn = nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on why you're setting the variables to nil
here?
@@ -16,6 +16,9 @@ type Client struct { | |||
setName *string | |||
allowFromRegExp *regexp.Regexp | |||
denyToRegExp *regexp.Regexp | |||
sourceArn *string | |||
fromArn *string | |||
returnPathArn *string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be better to create a struct called arns
that consists of those three arns and add that as member to this struct. Makes handling the arguments for a lot of the function calls a bit simpler.
Beginner with golang, I try to fixes #16 by implementing
SourceArn
,FromArn
andReturnPathArn
About adding some initializations in the
configure
function in main.go (e58ac12) , I did so because when you provide only SourceArn without FromArn and ReturnPathArn, it seems that it don't work like the documentation says