router

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteResult

type RouteResult struct {
	Name    string
	Params  map[string]string
	Query   string
	Anchor  string
	Tags    []string
	Methods []string
}

RouteResult represents the result of attempting to route a URL.

func Route

func Route(r *Router, url string) (RouteResult, bool)

type Router

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

func MakeRouter

func MakeRouter(jsonInput []byte, caseSensitive bool) (Router, error)

MakeRouter constructs a Router from JSON input

Jump to

Keyboard shortcuts

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