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

defined types and constants in different packages #515

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

defined types and constants in different packages #515

wants to merge 4 commits into from

Conversation

hilariocoelho
Copy link
Contributor

Moved some notifications related types and constants to different packages in order to make it easier for 3rd party services to implement gorush.

Since gorush package has some init functions (here and here), this package should not be directly imported by other projects. There is even an init function that registers prometheus metrics and may crash the project that tries to import the package.

This PR addresses this situation by moving types and constants values to different packages that only imports safe packages (appleboy/go-fcm) which don't have any init functions.

Having structs and constants defined in importable packages makes life easier for projects that need to call GoRush API by having already created types and constants values that are fully supported by GoRush itself.

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

Successfully merging this pull request may close these issues.

1 participant