go-notificationgo-notification

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 or api_key=… cannot land in your logs via the library. The err handed to Config.OnError is unchanged and still unredacted so you can inspect it; redact it yourself before logging. See Security & Redaction.
  • SECURITY.md added 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 Send no longer inherits the caller's cancellation. The background job runs on context.WithoutCancel(ctx): it keeps the context values (trace IDs, loggers) but ignores the deadline and cancellation. A request-scoped context cancelled right after Send returns no longer aborts the delivery or its retries. Use notification.Sync() when cancellation must apply. See Async & Worker Pool.
  • Closed-notifier race is reported. A Send whose job is rejected because the notifier was closed concurrently now fires OnError with ErrClosed and logs a warning, instead of being dropped silently.
  • Mail drivers route on their custom name. A mail driver registered with Name: "mail_tx" now calls RouteNotificationFor("mail_tx"), not "mail". Notifiables must handle the custom name. See Email Overview.
  • SMTP Config.Timeout bounds the whole session — connect, TLS handshake, and every command through QUIT — not just the dial. Implicit-TLS (port 465) dialing respects ctx.
  • SMTP MIME structure. A mail with text, HTML and attachments is now well-formed nested MIME: multipart/mixed containing a multipart/alternative part.
  • SMTP reply classification. 5xx replies are permanent and stop retries; 4xx replies are transient and retried.

Changed

  • Empty route skips silently. When RouteNotificationFor returns "", the channel is skipped for that notifiable with a debug log only. Previously the format path fired OnError with ErrNoRoute.
  • Library sentinels are not retried. ErrNoRoute, ErrInvalidMessage and ErrNoFormatter returned by a driver's Send are no longer retried. ErrInvalidMessage fires OnError once, and its message ends with : permanent error. See Retry & Backoff.
  • Examples are a separate Go module. The runnable programs under _examples/ have their own go.mod, so the library itself keeps zero third-party dependencies. The database examples import the cgo-free modernc.org/sqlite driver. Run them with cd _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 a LoginOTP SMS notification is sent with notification.Sync().

Security

  • HTTP driver errors no longer echo credentials. Errors that are logged and passed to OnError contain 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, Channel interfaces.
  • 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.