utils

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustOpen added in v1.0.0

func MustOpen(f string) *os.File

Types

type Form added in v1.0.0

type Form struct {
	// contains filtered or unexported fields
}

https://stackoverflow.com/questions/20205796/post-data-using-the-content-type-multipart-form-data

func NewForm added in v1.0.0

func NewForm() *Form

func (*Form) Encode added in v1.0.0

func (f *Form) Encode() (buf *bytes.Buffer, contentType string, err error)

Encode encodes the form into a multipart/form-data body.

func (*Form) Get added in v1.0.0

func (f *Form) Get(key string) io.Reader

func (*Form) Set added in v1.0.0

func (f *Form) Set(key string, value io.Reader)

func (*Form) SetFile added in v1.0.0

func (f *Form) SetFile(key, filepath string)

func (*Form) SetString added in v1.0.0

func (f *Form) SetString(key, value string)

Jump to

Keyboard shortcuts

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