Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 405 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 405 Bytes

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()
}