HTTP request data binder.
- Bind query string parameters to struct fields
- Bind form values to struct fields
- Bind JSON body to struct fields
- Get file from multipart form
- Bind multipart form values to struct fields (limited support, see supported types)
- Binder interface implementation
Supported types for binding from multipart form:
-
string
-
int
,int8
,int16
,int32
,int64
-
uint
,uint8
,uint16
,uint32
,uint64
-
float32
,float64
-
bool
-
map[string]interface{}
-
*binder.File
&binder.File
-
time.Time
-
[]string
-
[]int
,[]int8
,[]int16
,[]int32
,[]int64
-
[]uint
,[]uint8
,[]uint16
,[]uint32
,[]uint64
-
[]float32
,[]float64
-
[]bool
-
[]*binder.File
&[]binder.File
-
[]time.Time
go get -u github.com/dmitrymomot/binder
Coming soon...