Help us shape the future of Go! Take the 2026 Go Developer Survey

form

package
v2.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default is the default form field
	Default = make(url.Values)

	// Monoid is the [M.Monoid] for the [Endomorphism]
	Monoid = ENDO.Monoid[url.Values]()

	// ValuesMonoid is a [M.Monoid] to concatenate [url.Values] maps
	ValuesMonoid = RG.UnionMonoid[url.Values](A.Semigroup[string]())

	// AtValues is a [L.Lens] that focusses on the values of a form field
	AtValues = LRG.AtRecord[url.Values, []string]

	// AtValue is a [L.Lens] that focusses on first value in form fields
	AtValue = F.Flow2(
		AtValues,
		composeHead,
	)
)

Functions

func WithValue

func WithValue(name string) func(value string) Endomorphism

WithValue creates a [FormBuilder] for a certain field

Types

type Endomorphism

type Endomorphism = ENDO.Endomorphism[url.Values]

Endomorphism returns an [ENDO.Endomorphism] that transforms a form

func WithoutValue

func WithoutValue(name string) Endomorphism

WithoutValue creates a [FormBuilder] that removes a field

Jump to

Keyboard shortcuts

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