gzip

GitHub Workflow Status Codecov GoDoc Sourcegraph

Package gzip is a middleware that provides gzip compression to responses for Flamego.

Installation

The minimum requirement of Go is 1.16.

  1. go get github.com/flamego/gzip

Getting started

  1. package main
  2. import (
  3. "github.com/flamego/flamego"
  4. "github.com/flamego/gzip"
  5. )
  6. func main() {
  7. f := flamego.Classic()
  8. f.Use(gzip.Gzip())
  9. f.Get("/", func() string {
  10. return "ok"
  11. })
  12. f.Run()
  13. }

Getting help

License

This project is under the MIT License. See the LICENSE file for the full license text.