router

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 7 Imported by: 1

README

router

http路由器

Documentation

Index

Constants

View Source
const MatchedRoutePathKey = "$matched_router_path"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(http.ResponseWriter, *http.Request, []UrlParam)

type Router

type Router interface {
	Register(method, path string, handler Handler)
	GetHandler(method, path string) (Handler, []UrlParam, bool)
}

func New

func New() Router

type UrlParam

type UrlParam struct {
	Key   []byte
	Value []byte
}

Jump to

Keyboard shortcuts

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