params

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params map[string]any

Params is the data container that holds the parameters set for an action.

func (Params) Duration

func (p Params) Duration(key string, def time.Duration) (time.Duration, error)

Duration parses a parameter into a Go duration.

func (Params) Int added in v0.18.0

func (p Params) Int(key string, def int) (int, error)

Int parses a parameter into a int.

func (Params) String

func (p Params) String(key string, def string) (string, error)

String parses a parameter into a string.

func (Params) StringSlice added in v0.14.0

func (p Params) StringSlice(key string, def []string) ([]string, error)

Jump to

Keyboard shortcuts

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