Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.48 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.48 KB

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

go get github.com/flamego/gzip

Getting started

package main

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

func main() {
	f := flamego.Classic()
	f.Use(gzip.Gzip())
	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.