httpreq

package
v0.0.0-...-08b4e76 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDParam

func IDParam(r *http.Request, name string) (int, error)

IDParam calls chi.URLParam and if the parameter is set, returns the value as int.

func MustIDParam

func MustIDParam(r *http.Request, name string) int

MustIDParam calls chi.URLParam and if the parameter is set, returns the value as int. If the value is not an int or not positive, it panics.

func StrictIDParam

func StrictIDParam(r *http.Request, name string) (int, error)

StrictIDParam calls chi.URLParam and if the parameter is set, returns the value as int. If the value is not an int or not positive, an error with a helpful message is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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