form

package
v2.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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