method

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

Package method provide method based routing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(methods ...string) func(http.HandlerFunc) http.HandlerFunc

Must return middleware that only allowed method that specified in methods

Types

type H

type H map[string]http.HandlerFunc

H is type for mapping method and its handler

func (H) C

func (h H) C() http.HandlerFunc

C same as Compile with def equal to nil

func (H) Compile

func (h H) Compile(def http.HandlerFunc) http.HandlerFunc

Compile into single http.HandlerFunc. if def is nil, default handler is defhandler.StatusMethodNotAllowed

Jump to

Keyboard shortcuts

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