Documentation
¶
Overview ¶
Package form provides utilities for decoding HTTP form values into structs. It supports both standard and multipart forms, and can handle nested structs, slices, pointers, and custom decoders via struct tags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode parses form values from an *http.Request and populates the fields of dst, which MUST BE a pointer to a struct.
This function supports both standard and multipart forms, and can decode nested structs, slices, and pointers. Fields can be tagged with `form` to specify the form key. Returns an error if decoding fails or if dst is not a pointer to a struct.
func RegisterCustomTypeFunc ¶
RegisterCustomTypeFunc registers a custom decoder function for a specific type. The decoder function should accept a string and return the decoded value or an error. This allows Decode to handle custom types beyond the built-in decoders.
Types ¶
This section is empty.