pathparse

package module
v0.0.0-...-8336cee Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 4 Imported by: 0

README

pathparse

Rails-style route parsing for Go.

Installation

go get -u github.com/bentranter/pathparse

Usage

Don't use this yet – the API is terrible. This is an extraction from an old framework that needs updating, which I may or may not ever get to.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(routes []*Route) string

Routes returns a human readable string containing all routes.

Types

type Route

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

A Route is a Rails-style definition of a route.

func ParseRoute

func ParseRoute(verb, pattern string) *Route

ParseRoute generates the Rails-style route prefix from an HTTP verb and a URL path.

Jump to

Keyboard shortcuts

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