utils

package
v0.0.0-...-2d9d122 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvoidXSS

func AvoidXSS(theHTML string) string

AvoidXSS 避免XSS

func GetTodayTime

func GetTodayTime() time.Time

GetTodayTime 返回今天零点的time

func GetTodayYM

func GetTodayYM(sep string) string

GetTodayYM 得到以sep为分隔符的年、月字符串(今天所属于的月份)

func GetTodayYMD

func GetTodayYMD(sep string) string

GetTodayYMD 得到以sep为分隔符的年、月、日字符串(今天)

func GetTomorrowYMD

func GetTomorrowYMD(sep string) string

GetTomorrowYMD 得到以sep为分隔符的年、月、日字符串(明天)

func GetYesterdayTime

func GetYesterdayTime() time.Time

GetYesterdayTime 返回昨天零点的time

func GetYesterdayYMD

func GetYesterdayYMD(sep string) string

GetYesterdayYMD 得到以sep为分隔符的年、月、日字符串(昨天)

func LuosimaoVerify

func LuosimaoVerify(reqURL, apiKey, response string) error

LuosimaoVerify 对前端的验证码进行验证

func MarkdownToHTML

func MarkdownToHTML(md string) string

MarkdownToHTML 将markdown 转换为 html

func RelativeURLToAbsoluteURL

func RelativeURLToAbsoluteURL(curURL string, baseURL string) (string, error)

RelativeURLToAbsoluteURL 相对URL转绝对URL

func SetStructByJSON

func SetStructByJSON(obj interface{}, mapData map[string]interface{}) error

SetStructByJSON 由json对象生成 struct

func StrToIntMonth

func StrToIntMonth(month string) int

StrToIntMonth 字符串月份转整数月份

Types

This section is empty.

Jump to

Keyboard shortcuts

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