Repository navigation
v0.6.0
Added
-
Admin operational dashboard (opt-in).
admin.WithDashboard(admin.DashboardConfig{Status, Activity})turns/admin/into a page with database and migration status and recent request and job activity; without it, or with neither source set, the landing page is unchanged. The status comes from a function you supply (build it fromtango.Status), and the activity from anyobservability.Snapshotter. A failing or panicking source marks only its own card "unavailable" and logs the cause; the error text never reaches the page. New inobservability:SnapshotterandSnapshot(a read side that is separate fromRecorder),NewWindow(an opt-in in-memory collector: the last 60 minutes in one-minute buckets, HTTP requests by status class and latency, job runs by outcome, nothing per route or job, reset on restart, labelled "this instance only"), andMulti(feed several recorders at once). It is a starting point for "is this instance healthy right now", not a metrics store; keep an external monitoring system for history, alerts and several instances. -
MySQL 8.4 support.
mysql://user:pass@host:3306/dbinTANGO_DB_DSNselects the newdb.MySQLdialect, withgithub.com/go-sql-driver/mysqlas the driver. Migrations,Store, the admin,tango newproject --dialect=mysqlandtestdb(a fresh database per test;TANGO_TEST_DSN=mysql://…,testdb.MySQLOnly,testdb.NotMySQL) all work on it, and CI runs the suite on MySQL 8.4. Tables are InnoDB with theutf8mb4_bincollation; timestamps areDATETIME(6)in UTC; connections useREAD COMMITTEDunless the DSN sets another isolation level, and the default pool recycles a connection after five minutes. MariaDB is not supported. Differences to know: an unboundedstringthat isuniqueorindexed isVARCHAR(255)(a longer value returns a*db.ValueTooLongError),LIKEis case-sensitive, and a migration that fails part-way cannot roll back (the error names every applied step and writes no tracking row). See the setup guide. A project with ashell/main.gofrom before this release must copy the newdatabaseLabelfrom the shell guide before using MySQL, ortango shellprints the DSN's password. -
Admin dark mode. Every admin page now follows the browser's light or dark preference, and signed-in staff can pick Light, Dark or System from the sidebar footer; the choice is kept in a
tango_admin_themecookie scoped to/admin/. The light theme is nearly unchanged: input, checkbox and secondary-button borders are a shade darker, and primary and danger buttons darken on hover, so they meet WCAG contrast. Colours are now semantic tokens (bg-surface,text-ink,border-line, the status family, and so on) generated from one palette table, with contrast tests over its pairs in both themes. Widgets that hard-code light colours stay light, so switch them to the token classes in the admin guide; the Markdown preview stays a white canvas in both themes. There is nothing to configure.
Changed
-
AccessLoggeris free when its logger discards Info events. It used to wrap the response and build the event's attributes for every request and only then let the logger drop it (3 allocations a request). It now asks the logger first and calls the next handler directly. A logger that logs Info behaves as before; the level is read on every request, so aslog.LevelVarstill takes effect at once. -
Dependencies.
go.modnow requires chi 5.5.0 (was 5.3.2),golang.org/x/crypto0.58.0,x/sys0.49.0,x/term0.47.0 andmodernc.org/sqlite1.60.1, and addsgithub.com/go-sql-driver/mysql1.10.1 for the MySQL dialect. A project that depends on tanGO is raised to at least these versions the next time it updates; rungo mod tidy.
Documentation
- Choosing
MaxOpen. The configuration guide now explains how the size of the database pool shapes tail latency, with measured figures, and suggests starting near the database's CPU count.