gzip

package
v0.0.0-...-5178349 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2017 License: MIT, Apache-2.0 Imports: 3 Imported by: 0

README

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GzipHandler

func GzipHandler(h http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL