util

package
v0.0.0-...-fb5aa2b Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutImage

func CutImage(src image.Image, x, y, w, h int) (image.Image, error)

CutImage 裁剪图片

func HTTPGet

func HTTPGet(uri string, timeout int32) ([]byte, error)

HTTPGet 代理请求

func HTTPGetCustom

func HTTPGetCustom(uri string, timeout int32, proxyURL string, header http.Header) ([]byte, error)

HTTPGetCustom custom http client

func MkDirIfNotExist

func MkDirIfNotExist(path string) error

MkDirIfNotExist 如果指定文件夹不存在则创建

func MustInt32

func MustInt32(str string) int32

MustInt32 MustInt32

func OpenImageToBase64

func OpenImageToBase64(filename string) (string, error)

OpenImageToBase64 OpenImageToBase64

func OpenPNG

func OpenPNG(filename string) (image.Image, error)

OpenPNG 打开png图片

func PostForm

func PostForm(uri string, data url.Values, timeout int32) ([]byte, error)

PostForm PostForm

func SavePNG

func SavePNG(filename string, pic image.Image) error

SavePNG 保存png图片

Types

This section is empty.

Jump to

Keyboard shortcuts

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