gut

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date added in v0.1.2

func Date(format string, i int64) string

time时间戳转字符串

func HttpGet added in v0.1.2

func HttpGet(url string) string

http请求-Get

func Int2str

func Int2str(i int) string

int类型转字符串

func JsonDe added in v0.1.2

func JsonDe(jsonStr string) (interface{}, error)

json反序列化 -map

func JsonEn added in v0.1.2

func JsonEn(obj interface{}) (string, error)

json序列化

func Md5 added in v0.1.2

func Md5(s string) string

返回字符串ms5值

func Mkdir

func Mkdir(dir string) (code int, err error)

*

  • 检查并创建文件夹
  • @param dir 路径
  • @return code 0=出错,1=成功,2=已存在

func Paginator added in v0.1.2

func Paginator(page int, prepage int, nums int64) map[string]interface{}

分页算法

func PathExists

func PathExists(path string) (exist bool, err error)

*

  • 判断路径是否存在
  • @param path 路径
  • @return bool 是否已存在

func Rjosn added in v0.1.2

func Rjosn(w http.ResponseWriter, res interface{})

响应json数据

func Str2int

func Str2int(s string) int

字符串转int

func Str2uint added in v0.1.2

func Str2uint(s string) uint

字符串转uint

func Time added in v0.1.2

func Time() int64

获取当前时间戳

Types

This section is empty.

Jump to

Keyboard shortcuts

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