Changelog
Release history for go-notification.
All notable changes to go-notification are listed here. The format follows Keep a Changelog and the project adheres to semantic versioning starting from v1.0.0.
v1.0.2 — Redacted notifier logs, security policy
A patch release. No API changes.
Security
- The notifier's own log lines are redacted. The "notification delivery failed" log and the callback-panic logs now pass the error text through
middleware.Redact, so a driver error that echoes a bearer token orapi_key=…cannot land in your logs via the library. Theerrhanded toConfig.OnErroris unchanged and still unredacted so you can inspect it; redact it yourself before logging. See Security & Redaction. SECURITY.mdadded to the repository, with private vulnerability reporting through GitHub Security Advisories. See Reporting a vulnerability.
v1.0.1 — Bug fixes and hardening
A patch release. No API changes; a few behaviours were corrected, and the error values the HTTP drivers produce are now safe to log.
Fixed
- Async
Sendno longer inherits the caller's cancellation. The background job runs oncontext.WithoutCancel(ctx): it keeps the context values (trace IDs, loggers) but ignores the deadline and cancellation. A request-scoped context cancelled right afterSendreturns no longer aborts the delivery or its retries. Usenotification.Sync()when cancellation must apply. See Async & Worker Pool. - Closed-notifier race is reported. A
Sendwhose job is rejected because the notifier was closed concurrently now firesOnErrorwithErrClosedand logs a warning, instead of being dropped silently. - Mail drivers route on their custom name. A mail driver registered with
Name: "mail_tx"now callsRouteNotificationFor("mail_tx"), not"mail". Notifiables must handle the custom name. See Email Overview. - SMTP
Config.Timeoutbounds the whole session — connect, TLS handshake, and every command throughQUIT— not just the dial. Implicit-TLS (port 465) dialing respectsctx. - SMTP MIME structure. A mail with text, HTML and attachments is now well-formed nested MIME:
multipart/mixedcontaining amultipart/alternativepart. - SMTP reply classification. 5xx replies are permanent and stop retries; 4xx replies are transient and retried.
Changed
- Empty route skips silently. When
RouteNotificationForreturns"", the channel is skipped for that notifiable with a debug log only. Previously the format path firedOnErrorwithErrNoRoute. - Library sentinels are not retried.
ErrNoRoute,ErrInvalidMessageandErrNoFormatterreturned by a driver'sSendare no longer retried.ErrInvalidMessagefiresOnErroronce, and its message ends with: permanent error. See Retry & Backoff. - Examples are a separate Go module. The runnable programs under
_examples/have their owngo.mod, so the library itself keeps zero third-party dependencies. The database examples import the cgo-freemodernc.org/sqlitedriver. Run them withcd _examples && go run ./basic(and./multi-channel,./whatsapp-waha,./email-api,./full-example). - Full example. Slack and Telegram are registered with
Name: "slack"/Name: "telegram", and aLoginOTPSMS notification is sent withnotification.Sync().
Security
- HTTP driver errors no longer echo credentials. Errors that are logged and passed to
OnErrorcontain only the scheme and host of the request URL — never the path, query or userinfo. Telegram bot tokens and Slack/Discord/Teams webhook URLs no longer leak through error messages. - Response bodies are redacted. The response snippet embedded in an HTTP error passes through
middleware.Redact. - Webhook URL parse errors are redacted as well.
See Security & Redaction. Redaction of your own logging is still opt-in.
v1.0.0 — First public release
Core
- Notifier with goroutine worker pool, retry, exponential backoff, rate limiting.
Notification,Notifiable,Channelinterfaces.- Fluent message builders for email, WhatsApp, push, Slack, Telegram, SMS, database.
- Broadcast (
SendMulti) for fan-out to many recipients. - On-demand channel override at the call site.
- Auto-redaction of API keys and tokens in logs.
Channels
- Email: SMTP, Mailgun, SendGrid, AWS SES, Resend, Postmark, Mailtrap.
- WhatsApp: WAHA, Fonnte, Wablas, Twilio, Meta Cloud API.
- SMS: Twilio, Zenziva, Vonage (Nexmo), AWS SNS.
- Chat: Slack, Telegram, Discord, Microsoft Teams.
- Push: Firebase Cloud Messaging (FCM).
- Database: In-app notifications for Postgres, MySQL, SQLite.
- Webhook: Generic HTTP POST driver.
Documentation
- Landing page + Phase 1 launch docs (17 pages).
- Channel overview comparison tables.
- SMTP port-blocking guide.
- FAQ.
How versions work
The project follows semantic versioning:
- Patch (1.0.x) — bug fixes, doc updates, no API change.
- Minor (1.x.0) — new drivers, new features, backwards-compatible.
- Major (x.0.0) — breaking API changes. Reserved for genuine incompatibilities; we try hard to avoid them.