How to enable compression (gzip)?

How do I implement gzip in Go? Here is my code:

https://play.golang.org/p/aJy5DvM_LQP

TIA

It seems that one way to enable gzip is to use CDN. CloudFlare for an example adds this as an extra bonus. https://gowebstatic.tk/cdn

But it should be nice to know if and how this could be done within Go.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.