common

package
v0.0.0-...-a9e7740 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: Artistic-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugLog

func DebugLog(fileName string, level string, data string)

记录debug日志

func GbkAsUtf8

func GbkAsUtf8(str string) string

func Get

func Get(url string) (response string)

发送GET请求 url:请求地址 response:请求返回的内容

func HasChineseChar

func HasChineseChar(str string) bool

是否含义中文字符

func Implode

func Implode(glue string, pieces []string) string

数组转字符串

func InArray

func InArray(needle interface{}, haystack []interface{}) bool

* 检查数组中是否存在某个值

func IsEmpty

func IsEmpty(value interface{}, array []interface{}) bool

判断数据是否存在 不存在:true 存在:false

func Md5

func Md5(s string) string

生成MD5

func NonceStr

func NonceStr(length int) string

生成指定长度随机字符串

func Post

func Post(url string, data interface{}, contentType string) (content string)

发送POST请求 url:请求地址,data:POST请求提交的数据,contentType:请求体格式,如:application/json content:请求放回的内容

func SendYouDuMsg

func SendYouDuMsg(content string, admins []string, committer string) bool

发送有度短信

func Strtotime

func Strtotime(date string, formatType uint8) int64

日期转时间戳

func UniqueId

func UniqueId() string

生成Guid字串

Types

This section is empty.

Jump to

Keyboard shortcuts

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