/goji-gzip

gzip middleware for goji framework

Primary LanguageGoApache License 2.0Apache-2.0

goji_gzip

goji framework gzip middleware

example:

package main

import (
	"fmt"
	"github.com/lidashuang/goji_gzip"
	"net/http"

	"github.com/zenazn/goji"
)

func main() {

	// use gzip handle for every request
	goji.Use(gzip.GzipHandler)

	goji.Get("/", func(w http.ResponseWriter, r *http.Request) {
		fmt.Fprint(w, "helloworld..........")
	})

	goji.Serve()
}