cloudposse / cloudposse/slack-notifier
Refactor tool into tool+package
Open
- Dominant language
- Go
- Stars
- 79
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the Feature
More of a refactoring request. Currently the slack-notifier is a program, not a reusable package.
## Use Case
Use slack notifier from a running WebService.
## Describe Ideal Solution
I would like to import `slacknotifier` as a package and provide (overridden) message details as parameters.
```
notifier := slacknotifier.New(webhookURL)
err := notifier.Notify(payload)
```
The current main.go could import that package. A Go convention is to create a `cmd/slack-notifier` folder where the main.go will be.
In the past, I did a similar refactoring for https://github.com/kramphub/kiya
Contributor guide
Assessment
This issue has not been assessed yet.