Skip to content

v0.5.1

Choose a tag to compare

@cmj0121 cmj0121 released this 30 Apr 05:55
· 75 commits to main since this release

Highlights

  • Localization support (en + zh-TW + zh-CN)Accept-Language and ?locale= resolve to one of three catalogs that flow through render and service layers; CJK rune-width-aware padding keeps zh rows aligned. X-Imagelet-Locale echoes the resolved locale and Vary: Accept-Language is added so caches segment correctly. LRU bumped 256 → 1024 to absorb the per-locale fan-out. i18n.For returns *Catalog to keep the per-render hot path allocation-free.

Other changes

  • Outbound HTTP egress: single safehttp.DefaultUserAgent (was 7 hand-typed copies, drifted between /0.2 and /0.3); JSON decode paths drain the response body so connections re-enter the keep-alive pool.
  • Render: parseSVG propagates decoder errors instead of returning a partially-populated doc; PNG encoder defaults to DefaultCompression for a 3-5× CPU win on the OG card path.
  • renderSymbol uses errors.Is(err, twse.ErrUnavailable) at all six fetch sites — robust to provider %w wrapping.
  • Operator log messages converted to English so on-call engineers can grep them locale-independent.

Container image

ghcr.io/cmj0121/imagelet:0.5.1