Help us shape the future of Go! Take the 2026 Go Developer Survey

gorouter

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	http.ServeMux
	Err http.HandlerFunc
}

Router is a router based off ServeMux

func New

func New(errHandler ...http.HandlerFunc) *Router

New is a returns a new router instance

func (*Router) Add

func (rtr *Router) Add(pattern string, handler http.Handler, specific bool)

Add adds a new route to the router

func (*Router) ServeHTTP

func (rtr *Router) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Directories

Path Synopsis
example module

Jump to

Keyboard shortcuts

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