forms

package
v0.0.0-...-0964334 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMultipartMemory int64 = 1024 * 1024 // 1MB
)

Variables

View Source
var (
	ErrNotStruct   = errors.New("destination is not a struct")
	ErrNotPointer  = errors.New("destination is not a pointer")
	ErrContentType = errors.New("bad content type")
)

Functions

func Marshal

func Marshal(src any, dest *multipart.Writer, opts ...Option) error

func Unmarshal

func Unmarshal(r *http.Request, dest any, opts ...Option) error

Types

type Option

type Option func(*options)

func WithAcceptBlank

func WithAcceptBlank() Option

func WithMaxMultipartSize

func WithMaxMultipartSize(s int64) Option

func WithOmitEmpty

func WithOmitEmpty() Option

func WithParseLocalTime

func WithParseLocalTime() Option

func WithParseTimeInTZ

func WithParseTimeInTZ(l *time.Location) Option

func WithTag

func WithTag(t string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL