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.
form
✓ github.com/go-playground/form
Decodes URL values into a struct.
package main
import (
"fmt"
"net/url"
"github.com/go-playground/form"
)
type Person struct {
Name string `form:"name"`
Age int `form:"age"`
}
func main() {
vals := url.Values{"name": {"John"}, "age": {"30"}}
var p Person
decoder := form.NewDecoder()
if err := decoder.Decode(&p, vals); err != nil {
panic(err)
}
fmt.Printf("%+v\n", p)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
3.1.4+incompatiblelatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.