httprouter

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

http

http path based router

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router interface {
	// Route routes traffic to a registered http handle func.
	Route(w http.ResponseWriter, r *http.Request)
	// Register registers a http handle func against a path string.
	Register(path string, f func(w http.ResponseWriter, r *http.Request))
	// IsRegistered checks if a path is registered
	IsRegistered(path string) bool
}

Router routes traffic to a registered http handle func.

func NewRouter

func NewRouter() Router

NewRouter provides a new instance of Router

Jump to

Keyboard shortcuts

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