Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrWrongValue happens when there is a wrong value for the type. ErrWrongValue = "wrong value" // TagName is the tag used to register custom names for field. TagName = "formdata" )
Functions ¶
func Unmarshal ¶
Unmarshal takes the request, parses the multipart form data and fill the object out. Here is a complete example:
type Foo struct { Name string `formdata:"name"` Image *multipart.FileHeader `formdata:"image"` } foo := &Foo{} if err := formdata.Unmarshal(request, out); err != nil { // deal with error }
Types ¶
type Unmarshaler ¶
Unmarshaler is the interface to implements to deal with custom unmarshaling of form data.
Click to show internal directories.
Click to hide internal directories.