utility

package
v0.0.0-...-041f4c2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

@Description https://github.com/iancoleman/strcase @Author renjingneng @CreateTime 2020/8/15 19:37

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSignWithUrlencode

func CreateSignWithUrlencode(params map[string]string, token string) string

func CreateSignWithoutUrlencode

func CreateSignWithoutUrlencode(params map[string]string, token string) string

* 签名方法 @author yongliang2@leju.com @return string

func GenerateUploadPath

func GenerateUploadPath(pathType string) string

GenerateUploadPath 生成上传路径,XX/upload/pathType/year/month/day/

@Author renjingneng

@CreateTime 2020/8/14 11:07

func ImageConfig

func ImageConfig(r io.Reader) (image.Config, string, error)

ImageConfig 由于DecodeConfig方法调用需要引入太多包,所以为其包装一个新的方法

@Author renjingneng

@Return

(image.Config) {
 ColorModel: (*color.modelFunc)(0xc0000062e0)({
 f: (func(color.Color) color.Color) 0xb5f400
 }),
 Width: (int) 887,
 Height: (int) 1920
}

(string) (len=4) "tiff" (error) <nil> @CreateTime 2020/8/14 15:27

func MakeNonce

func MakeNonce(length int) string

func MoveUploadedFile

func MoveUploadedFile(file multipart.File, path string)

func ToCamel

func ToCamel(s string) string

ToCamel converts a string to CamelCase

func ToLowerCamel

func ToLowerCamel(s string) string

ToLowerCamel converts a string to lowerCamelCase

Types

This section is empty.

Jump to

Keyboard shortcuts

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