• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

romshark / datapages / 39611097833

21 Oct 2026 01:46PM UTC coverage: 52.703%. First build
39611097833

push

github

romshark
refactor: Pass asset hashes to the compressor

The server otherwise reuses the hash of the compressor only when
nothing wraps the compressor's handler. A wrapper that adds metrics or
a header makes the first request read each file 3 times.

Pass AssetsCompressor.Handler a function that returns the SHA-256 the
ETag cache takes of a file. The compressor hashes a file itself when
there is none, and again when it finds the file changed, since the
server keeps the hash of the old content.
AssetsCompressor has not been released.

First request of a compressible asset through a wrapped compressor
with WithAssetsCache. A text file without a typed extension reads
512 B more with WithAssetsCache.

45 of 53 new or added lines in 3 files covered. (84.91%)

32737 of 62116 relevant lines covered (52.7%)

4434.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.91
/runtime/httpserve/assetscache.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc