Open rominirani opened 7 years ago
This is a great post. I've really enjoyed experimenting with the Slack webhook. Some feedback:
In your raise
function: other than for readability, I don't see an advantage to declaring separate variables for WebhookURL
and postParams
when SlackIncomingWebhookURL
can simply be used in http.PostForm
and Sprintf
can be used when json.Marshal-ing the SlackMessage
.
Also, is there a reason you've declared so many variables and constants globally? In my version of the program I moved the githubStatus
declaration inside main
.
Please provide your feedback by posting a comment against this issue.