AJ ONeal b23610fdf1
refactor(formmailer): production-readiness + dataset.View compatibility
- Blacklist is now a CohortSource interface (Value() *ipcohort.Cohort).
  *dataset.View[ipcohort.Cohort] satisfies it directly; callers with
  an atomic.Pointer can wrap. Drops the atomic/sync import from the
  public API.
- SMTP send now uses net.Dialer.DialContext with a bounded SMTPTimeout
  (default 15s) and conn deadline, so a slow/hung relay no longer holds
  the request goroutine for WriteTimeout. Opportunistic STARTTLS added.
- MX lookup uses net.DefaultResolver.LookupMX with a bounded MXTimeout
  (default 3s), cancellable via r.Context().
- clientIP uses net.SplitHostPort (was LastIndex(":"), broken for IPv6).
- Per-IP limiter map now has a 10-minute TTL with opportunistic sweep
  every 1024 requests — previously grew unbounded.
- Sentinel errors switched to errors.New; fmt.Errorf was unused.
2026-04-20 19:32:40 -06:00
2026-04-09 14:23:33 -06:00
2021-03-10 16:58:54 -07:00
2025-10-11 19:03:58 -06:00

golib

Go Reference

Sometimes a little copying, sometimes a little dependency. Too small for their own repos.

The default branch is dev, but the stable, versioned tags are based on main.

Also, my Go Cheatsheet:

Description
Sometimes a little copying, sometimes a little dependency, but too small for their own repos.
Readme MPL-2.0 19 MiB
Languages
Go 100%