encoders

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalList

func MarshalList(data []interface{}) []byte

func MarshalMap

func MarshalMap(data map[string]interface{}) []byte

func StringMapToAnyMap

func StringMapToAnyMap(input map[string]string) map[string]interface{}

func ToMultipart

func ToMultipart(data map[string]any, files ...File) []byte

func ToURLValues

func ToURLValues(data map[string]any) []byte

Convert a map to a URL encoded string Can only convert primitive types.

Types

type File

type File struct {
	FileName  string    // Name of the file
	FieldName string    // Name of the field
	Reader    io.Reader // Reader of the file
}

Define a type for multipart files

Jump to

Keyboard shortcuts

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