get

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package get handles parasing and fetching get parameters from query string

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetParameter

type GetParameter struct {
	Default string
	Allowed []string
	Name    string
	// contains filtered or unexported fields
}

func New

func New(name string, defaultV string) *GetParameter

func WithChoices

func WithChoices(name string, allowed []string) (param *GetParameter)

WithChoices limits the allowed values of the get parameter Note: sets the first item from allowed as the default value

func (*GetParameter) Value

func (g *GetParameter) Value(r *http.Request) string

Jump to

Keyboard shortcuts

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