router

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router handles HTTP routing

func New

func New() *Router

New creates a new Router

func (*Router) AddRoute

func (r *Router) AddRoute(method, path string, handler http.HandlerFunc)

AddRoute adds a route to the router

func (*Router) ExtractParams

func (r *Router) ExtractParams(method, path string) map[string]string

ExtractParams extracts parameters from a path without executing the handler

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements http.Handler

Jump to

Keyboard shortcuts

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