Registry / utility / gorilla-schema

gorilla-schema

JSON →
library1.4.1gogounverified

Package gorilla/schema fills a struct with form values.

go get github.com/gorilla/schema
INSTALL
IMPORT
SIG · GORILLA-SCHEMA
G
gorilla-schema
utilitygov1.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

schema
github.com/gorilla/schema

Decode form values into a struct using gorilla/schema.

package main import ( "fmt" "github.com/gorilla/schema" ) type Person struct { Name string Phone struct { Label string Number string } } func main() { values := map[string][]string{ "Name": {"John"}, "Phone.Label": {"Home"}, "Phone.Number": {"123-456"}, } var p Person decoder := schema.NewDecoder() decoder.Decode(&p, values) fmt.Printf("%+v\n", p) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.4.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
gorilla-schema — go get gorilla-schema · libregistry