gitmyhub

notify

Go ★ 3.7k updated 3d ago

A dead simple Go library for sending notifications to various messaging services.

Go library that lets you send messages to Telegram, Discord, Slack, email, and 15+ other platforms from a single API call, without writing separate integration code for each service.

Gosetup: easycomplexity 2/5

Notify is a Go library that lets you send messages to multiple messaging platforms from a single, consistent API. Instead of writing separate integration code for each service you want to reach, you configure each one through a shared interface and then call one Send function to deliver your message across all of them at once.

The basic flow is: create a service object (for example, Telegram), tell it which chat or channel to send to, register it with the notifier, and then call Send with a subject and message body. You can register as many services as you like, and they all receive the same message when you trigger a send.

The library supports a wide range of messaging services out of the box: Telegram, Discord, Slack, Email (via SMTP), Amazon SES, Amazon SNS, Firebase Cloud Messaging, Google Chat, Mailgun, Line, Matrix, Plyer, RocketChat, SendGrid, Pushbullet, Microsoft Teams, Mattermost, and others. Each service is implemented as a separate Go package under the service/ directory, so you only import what you actually use.

The project started as a personal tool for the author's own notification needs and grew into a general library. The README notes that it is not suitable for critical production scenarios because it depends on third-party client libraries and external service APIs that can change. Using the library to send spam may result in bans on the affected platforms.

Installation is a single go get command. The library follows the pattern used by many logging libraries: global convenience functions are available, but the recommended approach is to create a local Notify instance and pass it through your application rather than relying on the global state.

Where it fits