Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.14 KB

File metadata and controls

41 lines (29 loc) · 1.14 KB

gzip

GitHub Workflow Status GoDoc

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

Installation

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.