httprouterwrapper

package
v0.0.0-...-58914f8 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package middleware allows the use of http.HandlerFunc compatible funcs with julienschmidt/httprouter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(h http.Handler) httprouter.Handle

Handler accepts a handler to make it compatible with http.HandlerFunc Example: r.GET("/", httprouterwrapper.Handler(http.HandlerFunc(controller.Index)))

func HandlerFunc

func HandlerFunc(h http.HandlerFunc) httprouter.Handle

HandlerFunc accepts the name of a function so you don't have to wrap it with http.HandlerFunc Example: r.GET("/", httprouterwrapper.HandlerFunc(controller.Index))

Types

This section is empty.

Jump to

Keyboard shortcuts

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