glib

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 44 Imported by: 32

README

glib

golang general library

glib common api

===========================

  • string
  • number
  • datetime
  • set
  • slice
  • rand
  • regexp
  • file
  • html
  • http
  • encode
  • security
  • reflect

Documentation

Index

Constants

View Source
const (
	UA_DEVICE_PC string = "pc"

	UA_DEVICE_TABLE             string = "table"
	UA_DEVICE_TABLE_IPAD        string = "ipad"
	UA_DEVICE_TABLE_IPOD        string = "ipod"
	UA_DEVICE_TABLE_ANDROID_PAD string = "apad"

	UA_DEVICE_MOBILE         string = "mobile"
	UA_DEVICE_MOBILE_IPHONE  string = "iphone"
	UA_DEVICE_MOBILE_ANDROID string = "android"
	UA_DEVICE_MOBILE_WINDOWS string = "winphone"

	UA_OS_WINDOWS string = "windows"
	UA_OS_MAC     string = "mac"
	UA_OS_LINUX   string = "linux"

	UA_UNKNOW string = "unknow"
)

================================================================================ * 用户浏览代理 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

Variables

This section is empty.

Functions

func AddDaysForCurrent

func AddDaysForCurrent(days int) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 在当前的日期时间增加指定的天数,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func AddHoursForCurrent

func AddHoursForCurrent(hours int) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 在当前的日期时间增加指定的小时数,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func AddMinutesForCurrent

func AddMinutesForCurrent(minutes int) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 在当前的日期时间增加指定的分钟数,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func AesDecrypt

func AesDecrypt(crypted, key []byte, args ...[]byte) ([]byte, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Aes解密 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func AesEncrypt

func AesEncrypt(origData, key []byte, args ...[]byte) ([]byte, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Aes加密 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Br2String

func Br2String(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 换行转br标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Command

func Command(cmd string, args ...string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 运行命令 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func CreateCurrentDateDir

func CreateCurrentDateDir(rootPath string, perm os.FileMode) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据当前日期在指定根目录下创建多级目录 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func CreateDateDir

func CreateDateDir(rootPath string, datetime time.Time, perm os.FileMode) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据指定的日期在指定的目录下创建多级目录 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func CreateDir

func CreateDir(perm os.FileMode, args ...string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 创建多级目录 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func CurrentTimeToString

func CurrentTimeToString(args ...interface{}) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 时间转字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func CutVideoImage

func CutVideoImage(sourceFile, newFilename string, width, height uint64, second, q int) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 从视频文件截取图片 * ffmpeg -i ./test.mp4 -ss 00:00:01 -s 120*120 -r 1 -q:v 2 -f image2 -vframes 1 image-%2d.jpg * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DateToIntSlice

func DateToIntSlice(date time.Time) []int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 日期转成int切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DateToStringSlice

func DateToStringSlice(date time.Time) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 日期转成日期字符串切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DateToUnixNanoTimestamp

func DateToUnixNanoTimestamp(date time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取指定日期的Unix纳秒时间戳 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DateToUnixTimestamp

func DateToUnixTimestamp(date time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取指定日期的Unix秒时间戳 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DatetimeAdd

func DatetimeAdd(firstDatetime time.Time, duration time.Duration) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * firstDatetime加上时间间隔duration,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DatetimeAddDay

func DatetimeAddDay(firstDatetime time.Time, dayValue int) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * firstDatetime加上指定的天数,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DatetimeAddHour

func DatetimeAddHour(firstDatetime time.Time, hourValue int) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * firstDatetime加上指定的小时数,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DatetimeAddMinute

func DatetimeAddMinute(firstDatetime time.Time, minuteValue int) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * firstDatetime加上指定的分钟数,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DatetimeAddSecond

func DatetimeAddSecond(firstDatetime time.Time, secondValue int) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * firstDatetime加上指定的秒数,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DatetimeSub

func DatetimeSub(firstDatetime, secondDatetime time.Time) time.Duration

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * firstDatetime减去secondDatetime,返回时间间隔 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DeleteFile

func DeleteFile(filename string, args ...string) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 删除文件 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DesDecrypt

func DesDecrypt(crypted, key []byte) ([]byte, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Des解密 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func DesEncrypt

func DesEncrypt(origData, key []byte) ([]byte, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Des加密 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func EmailFilter

func EmailFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 电子邮件过滤 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FileIsExists

func FileIsExists(filename string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断文件是否存在 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FilterHostProtocol

func FilterHostProtocol(path string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤主机协议 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FilterInt64Slice

func FilterInt64Slice(all, other []int64) []int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤int64数组(从all中过滤所有other中的数据,返回未被过滤的数据集合) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FilterStringSlice

func FilterStringSlice(all, other []string) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤字符数组(从all中过滤所有other中的数据,返回未被过滤的数据集合) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FilterUint64Slice

func FilterUint64Slice(all, other []uint64) []uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤uint64数组(从all中过滤所有other中的数据,返回未被过滤的数据集合) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FindPid

func FindPid(processName string) (int, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据进程名称找到对应的pid * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Float64ToString

func Float64ToString(value float64) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 浮点64转为字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Fnv32Hash added in v1.0.2

func Fnv32Hash(content string) uint32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串fnv哈希返回uint32数值 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Fnv64Hash added in v1.0.2

func Fnv64Hash(content string) uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串fnv哈希返回uint64数值 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FromBase64

func FromBase64(data string, args ...bool) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Base64字符解码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FromJson

func FromJson(jsonString string, object interface{}) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Json字符串转换成对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func FromXml

func FromXml(xmlString string, object interface{}) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Xml字符串转换成对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GenRsaKey

func GenRsaKey(bits int) (string, string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 生成RsaKey * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetAbsolutePath

func GetAbsolutePath(filePath string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取文件绝对全路径 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentDay

func GetCurrentDay() int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前日 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentDayCount

func GetCurrentDayCount(args ...time.Time) int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前日期月份对应的天数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentHour

func GetCurrentHour() int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前小时 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMinute

func GetCurrentMinute() int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前分钟 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMonth

func GetCurrentMonth() int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前月份 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMonthMaxDate

func GetCurrentMonthMaxDate(args ...time.Time) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当月里最大日期时间(2016-01-02 23:59:59 999999999) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMonthMaxNanoTimestamp

func GetCurrentMonthMaxNanoTimestamp(args ...time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当月里最大日期时间戳(当月最后一天最大时间),单位纳秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMonthMaxTimestamp

func GetCurrentMonthMaxTimestamp(args ...time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当月里最大日期时间戳(当月最后一天最大时间),单位秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMonthMinDate

func GetCurrentMonthMinDate(args ...time.Time) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当月里最小日期时间(2016-01-01 0:0:0 0) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMonthMinNanoTimestamp

func GetCurrentMonthMinNanoTimestamp(args ...time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当月里最小日期时间戳(当月第一天最小时间),单位纳秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentMonthMinTimestamp

func GetCurrentMonthMinTimestamp(args ...time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当月里最小日期时间戳(当月第一天最小时间),单位秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentPath

func GetCurrentPath() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前文件执行的全路径 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentSecond

func GetCurrentSecond() int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前秒数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentWeek

func GetCurrentWeek() int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前日期是周几(1:周一|2:周二|...|7:周日) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentWeekDayRange

func GetCurrentWeekDayRange() (int, int)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前周对应的月份里的日期范围(minDay in month, maxDay in month) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetCurrentYear

func GetCurrentYear() int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前年份 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateDay

func GetDateDay(datetime time.Time) int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期时间的日部分 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateHour

func GetDateHour(datetime time.Time) int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期时间的小时部分 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateMinute

func GetDateMinute(datetime time.Time) int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期时间的分钟部分 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateMonth

func GetDateMonth(datetime time.Time) int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期时间的月份 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateRangeForWeekInDateRange

func GetDateRangeForWeekInDateRange(startDate, endDate time.Time, week int) []time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期范围内的所属周几的日期集合 * week:从1开始,1表示周一,依次类推 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateSecond

func GetDateSecond(datetime time.Time) int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期时间的秒部分 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateYear

func GetDateYear(datetime time.Time) int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期时间的年份 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDateYearMonthDay

func GetDateYearMonthDay(args ...time.Time) int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前年月日的整型数字值 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDatetimeForDateAndTimeString

func GetDatetimeForDateAndTimeString(date time.Time, timeString string) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 日期时间的日期部分和时间字符串连接,返回日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDatetimeWeekString

func GetDatetimeWeekString(datetime time.Time) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期时间的日期和星期字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetDayCount

func GetDayCount(datetime time.Time) int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取指定日期月份对应的天数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetFileContent

func GetFileContent(fullFilename string) ([]byte, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取文件内容 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetFilePath

func GetFilePath(filePath string) (string, string)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取路径里的路径和文件名 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetFilename

func GetFilename(filePath string) (string, string, string)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取路径里的文件名,不带扩展名的文件名,扩展名 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetImageFile

func GetImageFile(filename string, args ...string) (image.Image, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取图片文件 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetMaxDate

func GetMaxDate(dtTime time.Time) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 返回日期的最大日期时间(2016-01-02 23:59:59 999999999) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetMaxDateNanoTimestamp

func GetMaxDateNanoTimestamp(dtTime time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期的最大日期时间戳,单位纳秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetMaxDateTimestamp

func GetMaxDateTimestamp(dtTime time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期的最大日期时间戳,单位秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetMinDate

func GetMinDate(dtTime time.Time) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 返回日期的最小日期时间(2016-01-02 00:00:00) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetMinDateNanoTimestamp

func GetMinDateNanoTimestamp(dtTime time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期的最小日期时间戳,单位纳秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetMinDateTimestamp

func GetMinDateTimestamp(dtTime time.Time) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取日期的最小日期时间戳,单位秒 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetNow

func GetNow() time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前Local日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetRelativePath

func GetRelativePath(fullpath string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取全文件路径的相对路径 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetSeqNumber

func GetSeqNumber() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前日期流水字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetStringCount

func GetStringCount(sourceString string) int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取字符串个数(不是字节数) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetStructFieldValueByName

func GetStructFieldValueByName(target interface{}, fieldName string) (string, interface{}, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据结构体和字段名获取对应的包名和字段值 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetSubString

func GetSubString(sourceString string, count int, args ...string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取指定长度的字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetTimeIntervalStringSlice

func GetTimeIntervalStringSlice(startDate, endDate time.Time, minutes int64) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取一段时间范围内指定间隔的时间段集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetTokenString

func GetTokenString() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前唯一Token字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetUint64SliceRange

func GetUint64SliceRange(int64Slice []uint64, count int) []uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取指定个数的uint64slice * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetUrlParam

func GetUrlParam(sourceUrl, paramName string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取url里指定参数的值 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetUtcNow

func GetUtcNow() time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前Utc日期时间 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func GetWeek

func GetWeek(datetime time.Time) int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取指定的日期是周几(1:周一|2:周二|...|7:周日) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Guid

func Guid() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 唯一Guid * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HasPrefix

func HasPrefix(content, target string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断内容字符串头是否包含指定的字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HasPrefixSuffix

func HasPrefixSuffix(content, target string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断内容字符串头尾是否包含指定的字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HasSuffix

func HasSuffix(content, target string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断内容字符串尾是否包含指定的字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Hash

func Hash(content string) uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串哈希返回uint64数值 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HmacSha1

func HmacSha1(data string, key string, args ...bool) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Hmac Sha1哈希 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HmacSha256

func HmacSha256(data string, key string, args ...bool) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Hmac Sha256哈希 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlAudioFilter

func HtmlAudioFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤html audio标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlCssFilter

func HtmlCssFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤html css标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlDecode

func HtmlDecode(source string, args ...bool) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * html解码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlEncode

func HtmlEncode(source string, args ...bool) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * html编码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlHyperLinkFilter

func HtmlHyperLinkFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤html超链接标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlImageFilter

func HtmlImageFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤html img标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlScriptFilter

func HtmlScriptFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤html script标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlTagFilter

func HtmlTagFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤html标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HtmlVideoFilter

func HtmlVideoFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤html video标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HttpGet

func HttpGet(url string, args ...string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Http Get请求 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HttpPost

func HttpPost(url, params string, args ...string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Http POST请求 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func HttpPostFile

func HttpPostFile(url, filename, fileTag string, params map[string]string) (int, map[string][]string, string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 上传文件 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IdCardNumFilter

func IdCardNumFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 身份证号过滤 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Int64Diff

func Int64Diff(one, two []int64) []int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * int64差集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Int64Inter

func Int64Inter(one, two []int64) []int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * int64交集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Int64SliceToString

func Int64SliceToString(intSlice []int64, args ...string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 用指定的字符串把int64切片链接为字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Int64SliceToStringSlice added in v1.0.1

func Int64SliceToStringSlice(values []int64) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 整型64切片转为字符串切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Int64ToString

func Int64ToString(value int64) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 整型64转为字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Int64Union

func Int64Union(one, two []int64) []int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * int64并集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IntSliceToDate

func IntSliceToDate(intSlice []int) (time.Time, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * int切片转成日期 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsAlpha

func IsAlpha(sourceString string, args ...interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否英文单词 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsAlphaOrNumber

func IsAlphaOrNumber(sourceString string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否英文单词或数字 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsChinese

func IsChinese(sourceString string, args ...interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否中文 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsDateGreaterThan

func IsDateGreaterThan(firstDatetime, secondDatetime time.Time) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断firstDatetime是否在secondDatetime的后面,即firstDatetime比secondDatetime日期大 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsDateLessThan

func IsDateLessThan(firstDatetime, secondDatetime time.Time) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断firstDatetime是否在secondDatetime的前面,即firstDatetime比secondDatetime日期小 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsEmail

func IsEmail(sourceString string, args ...interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否电子邮件 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsIdCardNum

func IsIdCardNum(sourceString string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否身份证号码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsLocalIp

func IsLocalIp(ip string) (bool, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否本地Ip * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsMatchStringSliceCount

func IsMatchStringSliceCount(srcSlice []string, maxCount, stringItemCount int) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断字符串切片及单个项的字符数是否匹配指定大小, * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsMobile

func IsMobile(sourceString string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否手机号码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsNumber

func IsNumber(sourceString string, args ...interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否数字 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsRegexpMatch

func IsRegexpMatch(sourceString string, pattern string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 正则是否匹配 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsSql

func IsSql(source string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否sql * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsTelphone

func IsTelphone(sourceString string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否电话号码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func IsUsername

func IsUsername(sourceString string, args ...interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否用户名(以英文字母开头,后面跟英文字母和数据以及下划线) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func JoinMapToString

func JoinMapToString(params map[string]string, filterKeys []string, isEscape bool) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字典参数升序排序,组成键=值集合,然后把集合用&拼接成字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Map64Hash added in v1.0.2

func Map64Hash(content string) uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串map哈希返回uint64数值 * 同一个输入字符串每次MapHash返回值会动态变化 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func MapDataSign

func MapDataSign(params map[string]string, secret string) (string, bool)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 签名算法 * params里的每个Value都需要进行url编码 * fmt.Sprintf("%s=%s", key, url.QueryEscape(value)) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func MarkdownImageFilter

func MarkdownImageFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤markdown img标记 * ![](http://a.b.com/s/1/000002/wKgAA1oAjnCAOrkgAADQl5vsv_s123.jpg) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Md5

func Md5(data string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Md5哈希 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func MinutesToTimeString

func MinutesToTimeString(minutes int64) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 分钟数转时间字符串(HH:mm:ss) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func MobileFilter

func MobileFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 手机号过滤 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func ModFloat64

func ModFloat64(value float64, length int) float64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 保留浮点数指定长度的小数位数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func MonthsToSeasons added in v1.0.2

func MonthsToSeasons(months []int32) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 月份数值集合转换成季节名集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func MoveFile

func MoveFile(srcFilename, dstPath string, creationDate time.Time) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 移动文件(全路径源文件,目的路径,日期,会根据日期自动创建路径然后连接到目的路径后) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewStringTable

func NewStringTable(args ...int) *stringTable

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化实例 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewkeywordNode

func NewkeywordNode() *keywordNode

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 新节点 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NumberToStringTable

func NumberToStringTable(id int64) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 数字映射字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Pkcs5Padding

func Pkcs5Padding(ciphertext []byte, blockSize int) []byte

func Pkcs5UnPadding

func Pkcs5UnPadding(origData []byte) []byte

func QueryEncode

func QueryEncode(value string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Query编码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RSADecrypt

func RSADecrypt(cipherData, privateKey []byte) ([]byte, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Rsa解密 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RSAEncrypt

func RSAEncrypt(origData, publicKey []byte) ([]byte, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Rsa加密 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RandInt

func RandInt(maxInt int) int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * maxInt以内的随机数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RandIntRange

func RandIntRange(min, max int) int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * min,max范围内的随机数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RandNumberString

func RandNumberString(length int) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 指定长度的随机数字 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RandString

func RandString(length int) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 随机英文和数字字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func ReverseString

func ReverseString(sourceString string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 翻转字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func ReverseUint64Slice

func ReverseUint64Slice(int64Slice []uint64)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 翻转uint64 Slice * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RsaPrivateToMultipleLine

func RsaPrivateToMultipleLine(privateKey string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 将单行的Ras Private字符串格式化为多行格式 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func RsaPublicToMultipleLine

func RsaPublicToMultipleLine(privateKey string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 将单行的Ras Public字符串格式化为多行格式 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func SafeParam

func SafeParam(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 安全参数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func SafeString

func SafeString(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 安全字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Salt

func Salt() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 随机Salt * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func SaveFile

func SaveFile(data []byte, filename, basePath string, args ...string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 保存文件 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Sha1

func Sha1(data string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Sha1哈希 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Sha256

func Sha256(data string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Sha256哈希 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Sha256WithRsa

func Sha256WithRsa(data string, privateKey string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Sha256WithRsa签名 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Sha256WithRsaVerify

func Sha256WithRsaVerify(data, sign, publicKey string) (bool, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Sha256WithRsa验签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Shuffle

func Shuffle(arr []int, args ...int)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 整型数组随机打乱 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func SplitIpPort

func SplitIpPort(ip string) (string, int)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 分隔Ip和端口 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func SqlFilter

func SqlFilter(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * sql过滤 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StartProcess

func StartProcess(processName string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 运行指定的进程 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StopProcess

func StopProcess(processName string) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 杀死指定pid进程 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func String2Br

func String2Br(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 换行转br标签 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringDiff

func StringDiff(one, two []string) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符集合的差集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringInter

func StringInter(one, two []string) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符集合的交集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringReplace

func StringReplace(sourceString string, args ...string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串替换 * sourceString: 原始字符串 * args[0...n-2]: 被替换字符串集合 * args[n-1]: 替换字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringSliceLatest

func StringSliceLatest(srcSlice []string, maxCount int) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 保留指定长度字符串切片,前面的数据移除 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringSliceToDate

func StringSliceToDate(dateStringSlice []string) (time.Time, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 日期字符串切片转成日期 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringSliceToInt64Slice added in v1.0.1

func StringSliceToInt64Slice(values []string) []int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串切片转为整型64切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringSliceToString

func StringSliceToString(stringSlice []string, args ...string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 用指定的字符串链接字符串切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringSliceToUint64Slice added in v1.0.1

func StringSliceToUint64Slice(values []string) []uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串切片转为无符号整型64切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringTableToNumber

func StringTableToNumber(sourceString string) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串映射数字 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToBool

func StringToBool(stringValue string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串转换为bool * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToFloat64

func StringToFloat64(stringValue string) float64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串转换为float64 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToInt32

func StringToInt32(stringValue string) int32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串转换为int32 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToInt64

func StringToInt64(stringValue string) int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串转换为int64 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToInt64Slice

func StringToInt64Slice(sourceString string, args ...string) []int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 用指定的字符串把源字符串分隔为int64切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToIntSlice

func StringToIntSlice(sourceString string, args ...string) []int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 用指定的字符串把源字符串分隔为int切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToStringSlice

func StringToStringSlice(sourceString string, args ...string) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 用指定的字符串分隔源字符串为字符串切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToTime

func StringToTime(datetimeString string, args ...interface{}) (time.Time, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串转时间 * isUtc参数决定传入的日期字符串是否是utc日期 * isUtc:bool | format:string * 返回UTC日期 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToUint32

func StringToUint32(stringValue string) uint32

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串转换为uint32 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToUint64

func StringToUint64(stringValue string) uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符串转换为uint64 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringToUint64Slice

func StringToUint64Slice(sourceString string, args ...string) []uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 用指定的字符串把源字符串分隔为uint64切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func StringUnion

func StringUnion(one, two []string) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字符集合的并集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func TimeStringAddMinutes

func TimeStringAddMinutes(timeString string, minutes int) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 时间字符串加指定的分钟数,返回时间字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func TimeToFriendString

func TimeToFriendString(datetime time.Time, args ...interface{}) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 日期时间转换成友好的显示字符串 * isUtc:bool | format:string * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func TimeToString

func TimeToString(datetime time.Time, args ...interface{}) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 时间转字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func ToBase64

func ToBase64(data string, args ...bool) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Base64字符编码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func ToJson

func ToJson(object interface{}) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转换成Json字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func ToQueryString

func ToQueryString(values map[string]interface{}, args ...bool) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 字典转URL查询字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func ToXml

func ToXml(object interface{}) (string, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象转换成Xml字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func TrimSpaceLine

func TrimSpaceLine(source string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 去除连续的换行符 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Try

func Try(fnSource func(), fnError func(interface{})) (er error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 捕获函数执行时的异常 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Uint64Diff

func Uint64Diff(one, two []uint64) []uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * uint64差集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Uint64Inter

func Uint64Inter(one, two []uint64) []uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * uint64交集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Uint64SliceToString

func Uint64SliceToString(uintSlice []uint64, args ...string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 用指定的字符串把uint64切片链接为字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Uint64SliceToStringSlice added in v1.0.1

func Uint64SliceToStringSlice(values []uint64) []string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 无符号整型64切片转为字符串切片 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Uint64ToString added in v1.0.1

func Uint64ToString(value uint64) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 无符号整型64转为字符串 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Uint64Union

func Uint64Union(one, two []uint64) []uint64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * uint64并集合 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UnixDate

func UnixDate() time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Golang零时间日期(0001-01-01 00:00:00) * -62135596800 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UnixNanoTimestamp

func UnixNanoTimestamp() int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前Unix纳秒时间戳 * 当前日期距离197011000的纳秒数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UnixNanoTimestampToDate

func UnixNanoTimestampToDate(unixNanoTimestamp int64) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据Unix纳秒时间戳返回日期 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UnixTimestamp

func UnixTimestamp() int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取当前Unix时间戳 * 当前日期距离197011000的秒数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UnixTimestampDate

func UnixTimestampDate() time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Unix时间戳日期(1970-01-01 00:00:00) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UnixTimestampToDate

func UnixTimestampToDate(unixTimestamp int64) time.Time

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据Unix时间戳返回日期 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UrlDecode

func UrlDecode(sourceUrl string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Url解码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func UrlEncode

func UrlEncode(sourceUrl string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Url编码 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Types

type FieldInfo

type FieldInfo struct {
	Index     []int
	Name      string
	Kind      string
	Type      string
	Value     reflect.Value
	Tag       reflect.StructTag
	Interface interface{}
	Childs    []*FieldInfo
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Reflect * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type FileInfo

type FileInfo struct {
	Filename string `form:"filename" json:"filename"` //原始文件名(test.jpg)
	Data     []byte `form:"data" json:"data"`         //文件字节切片
	Size     int64  `form:"size" json:"size"`         //大小(单位:字节)
	Duration int64  `form:"duration" json:"duration"` //时长(单位:秒)
	Path     string `form:"path" json:"path"`         //全路径(本地磁盘或第三方文件系统)
}

================================================================================ * 文件 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

func GetHttpRequestFile

func GetHttpRequestFile(req *http.Request, args ...int32) (*FileInfo, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取Http请求里的文件数据 * maxSize: 文件大小限制,0表示不限制 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func SaveHttpFile

func SaveHttpFile(req *http.Request, filename, basePath string, maxSize int32, args ...string) (*FileInfo, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 保存Http 上传的文件到磁盘指定目录(返回客户端原文件名,大小,全文件路径,错误) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type FileInfoList

type FileInfoList []*FileInfo

================================================================================ * 文件 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

type IFileSize

type IFileSize interface {
	Size() int64
}

================================================================================ * 文件 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

type Keyword

type Keyword struct {
	Root *keywordNode
}

func NewKeyword

func NewKeyword() *Keyword

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 新关键词 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Keyword) AddKeyword

func (s *Keyword) AddKeyword(keyword string)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 增加关键字 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Keyword) AddKeywords

func (s *Keyword) AddKeywords(keywords ...string)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 增加关键字 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Keyword) Filter

func (s *Keyword) Filter(content string, args ...string) string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 过滤关键字 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type MethodInfo

type MethodInfo struct {
	Index  int
	Name   string
	Value  reflect.Value
	NumIn  int
	NumOut int
	In     []string
	Out    []string
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Reflect * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type Paging added in v1.0.2

type Paging struct {
	PagingIndex int64  `form:"paging_index" json:"paging_index"` //current page index
	PagingSize  int64  `form:"paging_size" json:"paging_size"`   //size per page
	TotalRecord int64  `form:"total_record" json:"total_record"` //total records
	PagingCount int64  `form:"paging_count" json:"paging_count"` //total pages
	Sortorder   string `form:"sortorder" json:"-"`               //sort
	Group       string `form:"group" json:"-"`                   //group
	IsTotalOnce bool   `form:"-" json:"-"`                       //calculate the total number of records only on the first page(every time by default)
}

================================================================================ * paging * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

func NewPaging added in v1.0.2

func NewPaging() *Paging

func (*Paging) EndIndex added in v1.0.2

func (paging *Paging) EndIndex() int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * get the end record index * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Paging) Offset added in v1.0.2

func (paging *Paging) Offset() int64

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * get paginated offset * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Paging) SetTotalRecord added in v1.0.2

func (paging *Paging) SetTotalRecord(totalRecord int64)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * set the total number of records * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type Reflect

type Reflect struct {
	// contains filtered or unexported fields
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Reflect * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewReflect

func NewReflect(target interface{}) *Reflect

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 实例化Reflect * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Dump

func (s *Reflect) Dump() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 输出信息 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Field

func (s *Reflect) Field(index int) (fieldValue reflect.Value, er error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据字段索引获取reflect.Value * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) FieldByIndex

func (s *Reflect) FieldByIndex(indexs []int) (fieldValue reflect.Value, er error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据字段索引链获取reflect.Value * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) FieldByName

func (s *Reflect) FieldByName(name string) (reflect.Value, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据字段名称获取reflect.Value * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) FieldInfo

func (s *Reflect) FieldInfo(index int) (fieldInfo *FieldInfo, er error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据字段索引获取FieldInfo * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) FieldInfoByIndex

func (s *Reflect) FieldInfoByIndex(indexs []int) (fieldInfo *FieldInfo, er error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据字段索引链获取*FieldInfo * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) FieldInfoByName

func (s *Reflect) FieldInfoByName(name string) (*FieldInfo, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据字段名称获取FieldInfo * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Fields

func (s *Reflect) Fields() ([]*FieldInfo, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取字段集合[]*FieldInfo * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Interface added in v1.0.2

func (s *Reflect) Interface() interface{}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 对象信息 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Invoke

func (s *Reflect) Invoke(methodName string, args ...interface{}) ([]reflect.Value, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 调用指定名称的方法 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsArray added in v1.0.2

func (s *Reflect) IsArray() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否数组对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsAssignableTo

func (s *Reflect) IsAssignableTo(inter interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断类型的值可否赋值给指定类型 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsComparable

func (s *Reflect) IsComparable() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断类型可否进行比较操作 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsConvertibleTo

func (s *Reflect) IsConvertibleTo(inter interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断类型的值可否转换为指定类型 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsFunc added in v1.0.2

func (s *Reflect) IsFunc() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否func对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsImplements

func (s *Reflect) IsImplements(inter interface{}) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否实现指定接口。 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsMap added in v1.0.2

func (s *Reflect) IsMap() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否Map对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsPtr added in v1.0.2

func (s *Reflect) IsPtr() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否ptr对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsSlice

func (s *Reflect) IsSlice() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否切片对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) IsStruct

func (s *Reflect) IsStruct() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 是否结构对象 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Kind

func (s *Reflect) Kind() reflect.Kind

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取底层类型 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Len added in v1.0.2

func (s *Reflect) Len() int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 长度 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Method

func (s *Reflect) Method(index int) (reflect.Value, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据方法索引获取reflect.Value * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) MethodByName

func (s *Reflect) MethodByName(name string) (reflect.Value, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据方法名称获取reflect.Value * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) MethodInfoByName

func (s *Reflect) MethodInfoByName(name string) (*MethodInfo, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据方法名称获取*MethodInfo * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Methods

func (s *Reflect) Methods() []*MethodInfo

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取方法集合[]*MethodInfo * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) NumField

func (s *Reflect) NumField() int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取字段数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) NumMethod

func (s *Reflect) NumMethod() int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取方法数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) SetField

func (s *Reflect) SetField(name string, value interface{}) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 设置字段值 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Size

func (s *Reflect) Size() uintptr

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 类型大小 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Tag

func (s *Reflect) Tag(index int) reflect.StructTag

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 根据索引获取字段reflect.StructTag * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Type

func (s *Reflect) Type() reflect.Type

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 类型信息 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*Reflect) Value

func (s *Reflect) Value() reflect.Value

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 值信息 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type ReflectFunc

type ReflectFunc struct {
	// contains filtered or unexported fields
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * Reflect * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewReflectFunc

func NewReflectFunc() *ReflectFunc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 实例化ReflectFunc * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*ReflectFunc) Call

func (s *ReflectFunc) Call(key string, args ...interface{}) ([]reflect.Value, error)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 动态调用函数 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*ReflectFunc) Register

func (s *ReflectFunc) Register(key string, fn interface{}) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 注册Reflect * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type UserAgent

type UserAgent struct {
	// contains filtered or unexported fields
}

func NewUserAgent

func NewUserAgent(content string) *UserAgent

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化UserAgent * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) GetContent

func (s *UserAgent) GetContent() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取原始信息 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) GetDevice

func (s *UserAgent) GetDevice() UserAgentDevice

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取设备 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) GetOs

func (s *UserAgent) GetOs() UserAgentOs

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取操作系统 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsAndroid

func (s *UserAgent) IsAndroid() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Android * Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsAndroidPad

func (s *UserAgent) IsAndroidPad() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Android Pad * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsBlackBerry

func (s *UserAgent) IsBlackBerry() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否BlackBerry * Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+ * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsChromeBrowser

func (s *UserAgent) IsChromeBrowser() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Chrome Browser * Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsFirfoxBrowser

func (s *UserAgent) IsFirfoxBrowser() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Firefox Browser * Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:66.0) Gecko/20100101 Firefox/66.0 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsIeBrowser

func (s *UserAgent) IsIeBrowser() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否IE Browser * Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsIpad

func (s *UserAgent) IsIpad() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Ipad * Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsIphone

func (s *UserAgent) IsIphone() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Iphone * Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsIpod

func (s *UserAgent) IsIpod() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Ipod * Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsMobile

func (s *UserAgent) IsMobile() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Mobile * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsOperaBrowser

func (s *UserAgent) IsOperaBrowser() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Opera Browser * Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsPc

func (s *UserAgent) IsPc() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Pc * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsSafariBrowser

func (s *UserAgent) IsSafariBrowser() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Safari Browser * Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsTable

func (s *UserAgent) IsTable() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Table * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*UserAgent) IsWindowsPhone

func (s *UserAgent) IsWindowsPhone() bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 判断是否Windows Phone * Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; Titan) * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type UserAgentDevice

type UserAgentDevice struct {
	// contains filtered or unexported fields
}

func (UserAgentDevice) GetChildName

func (s UserAgentDevice) GetChildName() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取设备子名称 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (UserAgentDevice) GetContent

func (s UserAgentDevice) GetContent() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取设备信息 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (UserAgentDevice) GetName

func (s UserAgentDevice) GetName() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取设备名称 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type UserAgentOs

type UserAgentOs struct {
	// contains filtered or unexported fields
}

func (UserAgentOs) GetContent

func (s UserAgentOs) GetContent() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取操作系统信息 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (UserAgentOs) GetName

func (s UserAgentOs) GetName() string

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取操作系统名称 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Jump to

Keyboard shortcuts

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