Documentation ¶
Index ¶
Constants ¶
View Source
const ( MIMEJSON = "application/json" MIMEMultipartPOSTForm = "multipart/form-data" )
Variables ¶
View Source
var ( JSON = jsonBinding{} Form = formBinding{} FormMultipart = formMultipartBinding{} )
View Source
var ( // ErrConvertMapStringSlice can not convert to map[string][]string ErrConvertMapStringSlice = errors.New("can not convert to map slices of strings") // ErrConvertToMapString can not convert to map[string]string ErrConvertToMapString = errors.New("can not convert to map of strings") )
View Source
var ( // ErrMultiFileHeader multipart.FileHeader invalid ErrMultiFileHeader = errors.New("unsupported field type for multipart.FileHeader") // ErrMultiFileHeaderLenInvalid array for []*multipart.FileHeader len invalid ErrMultiFileHeaderLenInvalid = errors.New("unsupported len of array for []*multipart.FileHeader") )
View Source
var EnableDecoderDisallowUnknownFields = false
View Source
var EnableDecoderUseNumber = false
Functions ¶
func BytesToString ¶ added in v0.8.2
BytesToString converts byte slice to string without a memory allocation. For more details, see https://github.com/golang/go/issues/53003#issuecomment-1140276077.
func StringToBytes ¶ added in v0.8.2
StringToBytes converts string to byte slice without a memory allocation. For more details, see https://github.com/golang/go/issues/53003#issuecomment-1140276077.
Types ¶
type SliceValidationError ¶
type SliceValidationError []error
func (SliceValidationError) Error ¶
func (err SliceValidationError) Error() string
type StructValidator ¶
var Validator StructValidator = &defaultValidator{}
Click to show internal directories.
Click to hide internal directories.