Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kimpepper committed Jul 8, 2020
1 parent 8fc9383 commit 7044dda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/sns-slack-notifier/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ func main() {

// HandleRequest contains the code which will be executed.
func HandleRequest(ctx context.Context, snsEvent events.SNSEvent) error {
slackApi := slack.New(*cliSlackToken)
slackAPI := slack.New(*cliSlackToken)
for _, record := range snsEvent.Records {
snsRecord := record.SNS
attachment := slack.Attachment{
Color: *cliSlackMessageColor,
Text: snsRecord.Message,
Footer: fmt.Sprintf(":skpr: %s Source: %s MessageID: %s Topic: %s", snsRecord.Timestamp.Format(time.UnixDate), record.EventSource, snsRecord.MessageID, snsRecord.TopicArn),
}
_, _, err := slackApi.PostMessage(*cliSlackChannel, slack.MsgOptionText(snsRecord.Subject, false), slack.MsgOptionAttachments(attachment))
_, _, err := slackAPI.PostMessage(*cliSlackChannel, slack.MsgOptionText(snsRecord.Subject, false), slack.MsgOptionAttachments(attachment))
if err != nil {
return err
}
Expand Down

0 comments on commit 7044dda

Please sign in to comment.