Skip to content
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

Refactor tool into tool+package #15

Open
emicklei opened this issue Aug 10, 2023 · 0 comments
Open

Refactor tool into tool+package #15

emicklei opened this issue Aug 10, 2023 · 0 comments

Comments

@emicklei
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant