Skip to content

flamego/brotli

Repository files navigation

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.18.

go get github.com/flamego/brotli

Getting started

package main

import (
	"github.com/flamego/brotli"
	"github.com/flamego/flamego"
)

func main() {
	f := flamego.Classic()
	f.Use(brotli.Brotli())
	f.Get("/", func() string {
		return "ok"
	})
	f.Run()
}

Getting help

License

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