node

package
v0.0.0-...-20f3002 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDublicate = errors.New("more than one routes have the same registered path")

ErrDublicate returned from MakeChild when more than one routes have the same registered path.

Functions

This section is empty.

Types

type Nodes

type Nodes []*node

Nodes a conversion type for []*node.

func (*Nodes) Add

func (nodes *Nodes) Add(path string, handlers context.Handlers) error

Add adds a node to the tree, returns an ErrDublicate error on failure.

func (Nodes) Find

func (nodes Nodes) Find(path string, params *context.RequestParams) context.Handlers

Find resolves the path, fills its params and returns the registered to the resolved node's handlers.

func (Nodes) Sort

func (nodes Nodes) Sort()

Sort sets the static paths first.

Jump to

Keyboard shortcuts

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