common

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetField added in v1.5.0

func GetField(r *http.Request, index int) string

func HandleRoute added in v1.5.0

func HandleRoute(routes []Route, w http.ResponseWriter, r *http.Request) bool

func Serve

func Serve(ctx context.Context, addr string, handler http.Handler)

Types

type Route added in v1.5.0

type Route struct {
	Method  string
	Regex   *regexp.Regexp
	Handler http.HandlerFunc
}

func NewRoute added in v1.5.0

func NewRoute(method, pattern string, handler http.HandlerFunc) Route

Jump to

Keyboard shortcuts

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