util

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendStrings

func AppendStrings(slice *[]string, str string)

AppendStrings appends string to slice pointer.

func Atof

func Atof(v string) float32

Atof converts string to float32.

func Atoi

func Atoi(v string) int

Atoi converts string to integer.

func Btoa

func Btoa(v bool) string

Btoa converts bool to string.

func CompareError

func CompareError(err error, message string) bool

func EncodeQuery

func EncodeQuery(v url.Values) string

func Error

func Error(message string) error

func IsExists

func IsExists(path string) bool

IsExists check whether file or a folder is exists.

func StringEquals

func StringEquals(a, b string) bool

StringEquals compares equality between strings.

func Stringify

func Stringify(s interface{}) string

Stringify converts struct to JSON string.

Types

type Multipart

type Multipart struct {
	*bytes.Buffer
	ContentType string
}

func BuildMultipart

func BuildMultipart(data map[string]interface{}) (*Multipart, error)

BuildMultipart builds map into multipart/form-data.

Jump to

Keyboard shortcuts

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