brotli

GitHub Workflow Status Codecov GoDoc Sourcegraph

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

Installation

The minimum requirement of Go is 1.16.

  1. go get github.com/flamego/brotli

Getting started

  1. package main
  2. import (
  3. "github.com/flamego/brotli"
  4. "github.com/flamego/flamego"
  5. )
  6. func main() {
  7. f := flamego.Classic()
  8. f.Use(brotli.Brotli())
  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.