Versions in this module Expand all Collapse all v0 v0.0.5 Feb 18, 2021 Changes in this version + func AddDaysForCurrent(days int) time.Time + func AddHoursForCurrent(hours int) time.Time + func AddMinutesForCurrent(minutes int) time.Time + func Br2String(source string) string + func Command(cmd string, args ...string) (string, error) + func CurrentTimeToString(args ...interface{}) string + func DateToIntSlice(date time.Time) []int + func DateToStringSlice(date time.Time) []string + func DateToUnixNanoTimestamp(date time.Time) int64 + func DateToUnixTimestamp(date time.Time) int64 + func DatetimeAdd(firstDatetime time.Time, duration time.Duration) time.Time + func DatetimeAddDay(firstDatetime time.Time, dayValue int) time.Time + func DatetimeAddHour(firstDatetime time.Time, hourValue int) time.Time + func DatetimeAddMinute(firstDatetime time.Time, minuteValue int) time.Time + func DatetimeAddSecond(firstDatetime time.Time, secondValue int) time.Time + func DatetimeSub(firstDatetime, secondDatetime time.Time) time.Duration + func EmailFilter(source string) string + func EncodeMd5(value string) string + func FilterHostProtocol(path string) string + func FilterInt64Slice(all, other []int64) []int64 + func FilterStringSlice(all, other []string) []string + func FilterUint64Slice(all, other []uint64) []uint64 + func FindProcessID(processName string) (int, error) + func Float64ToString(value float64) string + func FromBase64(data string, args ...bool) (string, error) + func FromJson(jsonString string, object interface{}) error + func FromXml(xmlString string, object interface{}) error + func GetCurrentDay() int32 + func GetCurrentDayCount(args ...time.Time) int + func GetCurrentHour() int32 + func GetCurrentMinute() int32 + func GetCurrentMonth() int32 + func GetCurrentMonthMaxDate(args ...time.Time) time.Time + func GetCurrentMonthMaxNanoTimestamp(args ...time.Time) int64 + func GetCurrentMonthMaxTimestamp(args ...time.Time) int64 + func GetCurrentMonthMinDate(args ...time.Time) time.Time + func GetCurrentMonthMinNanoTimestamp(args ...time.Time) int64 + func GetCurrentMonthMinTimestamp(args ...time.Time) int64 + func GetCurrentSecond() int32 + func GetCurrentWeek() int + func GetCurrentWeekDayRange() (int, int) + func GetCurrentYear() int32 + func GetDateDay(datetime time.Time) int32 + func GetDateHour(datetime time.Time) int32 + func GetDateMinute(datetime time.Time) int32 + func GetDateMonth(datetime time.Time) int32 + func GetDateRangeForWeekInDateRange(startDate, endDate time.Time, week int) []time.Time + func GetDateSecond(datetime time.Time) int32 + func GetDateYear(datetime time.Time) int32 + func GetDateYearMonthDay(args ...time.Time) int + func GetDatetimeForDateAndTimeString(date time.Time, timeString string) time.Time + func GetDatetimeWeekString(datetime time.Time) string + func GetDayCount(datetime time.Time) int + func GetMaxDate(dtTime time.Time) time.Time + func GetMaxDateNanoTimestamp(dtTime time.Time) int64 + func GetMaxDateTimestamp(dtTime time.Time) int64 + func GetMinDate(dtTime time.Time) time.Time + func GetMinDateNanoTimestamp(dtTime time.Time) int64 + func GetMinDateTimestamp(dtTime time.Time) int64 + func GetNow() time.Time + func GetStringCount(sourceString string) int + func GetSubString(sourceString string, count int, args ...string) string + func GetTimeIntervalStringSlice(startDate, endDate time.Time, minutes int64) []string + func GetTokenString() string + func GetUint64SliceRange(int64Slice []uint64, count int) []uint64 + func GetUtcNow() time.Time + func GetWeek(datetime time.Time) int + func HasPrefix(content, target string) bool + func HasPrefixSuffix(content, target string) bool + func HasSuffix(content, target string) bool + func HtmlToPureText(html string) string + func IdCardNumFilter(source string) string + func Int64Diff(one, two []int64) []int64 + func Int64Inter(one, two []int64) []int64 + func Int64SliceToString(intSlice []int64, args ...string) string + func Int64SliceToStringSlice(values []int64) []string + func Int64ToString(value int64) string + func Int64Union(one, two []int64) []int64 + func IntSliceToDate(intSlice []int) (time.Time, error) + func IsAlpha(sourceString string, args ...interface{}) bool + func IsAlphaOrNumber(sourceString string) bool + func IsChinese(sourceString string, args ...interface{}) bool + func IsDateGreaterThan(firstDatetime, secondDatetime time.Time) bool + func IsDateLessThan(firstDatetime, secondDatetime time.Time) bool + func IsIdCardNum(sourceString string) bool + func IsMatchStringSliceCount(srcSlice []string, maxCount, stringItemCount int) bool + func IsNumber(sourceString string, args ...interface{}) bool + func IsRegexpMatch(sourceString string, pattern string) bool + func IsSql(source string) bool + func IsTelphone(sourceString string) bool + func IsUsername(sourceString string, args ...interface{}) bool + func JoinMapToString(params map[string]string, filterKeys []string, isEscape bool) string + func MapDataSign(params map[string]string, secret string) (string, bool) + func Md5(value string) string + func Min(x, y int) int + func MinutesToTimeString(minutes int64) string + func MobileFilter(source string) string + func ModFloat64(value float64, length int) float64 + func MonthsToSeasons(months []int32) []string + func ReverseString(sourceString string) string + func ReverseUint64Slice(int64Slice []uint64) + func Split(str, sep string) []string + func SqlFilter(source string) string + func StartProcess(processName string) (string, error) + func StopProcess(processName string) (string, error) + func String2Br(source string) string + func StringDiff(one, two []string) []string + func StringInter(one, two []string) []string + func StringReplace(sourceString string, args ...string) string + func StringSliceLatest(srcSlice []string, maxCount int) []string + func StringSliceToDate(dateStringSlice []string) (time.Time, error) + func StringSliceToInt64Slice(values []string) []int64 + func StringSliceToString(stringSlice []string, args ...string) string + func StringSliceToUint64Slice(values []string) []uint64 + func StringToBool(stringValue string) bool + func StringToFloat64(stringValue string) float64 + func StringToInt32(stringValue string) int32 + func StringToInt64(stringValue string) int64 + func StringToInt64Slice(sourceString string, args ...string) []int64 + func StringToIntSlice(sourceString string, args ...string) []int + func StringToStringSlice(sourceString string, args ...string) []string + func StringToTime(datetimeString string, args ...interface{}) (time.Time, error) + func StringToUint32(stringValue string) uint32 + func StringToUint64(stringValue string) uint64 + func StringToUint64Slice(sourceString string, args ...string) []uint64 + func StringUnion(one, two []string) []string + func SubString(src string, start, end int) string + func Substr(s string, pos, length int) string + func TimeStringAddMinutes(timeString string, minutes int) string + func TimeToFriendString(datetime time.Time, args ...interface{}) string + func TimeToString(datetime time.Time, args ...interface{}) string + func ToBase64(data string, args ...bool) string + func ToJson(object interface{}) (string, error) + func ToXml(object interface{}) (string, error) + func TrimSpaceLine(source string) string + func Uint64Diff(one, two []uint64) []uint64 + func Uint64Inter(one, two []uint64) []uint64 + func Uint64SliceToString(uintSlice []uint64, args ...string) string + func Uint64SliceToStringSlice(values []uint64) []string + func Uint64ToString(value uint64) string + func Uint64Union(one, two []uint64) []uint64 + func UnixDate() time.Time + func UnixNanoTimestamp() int64 + func UnixNanoTimestampToDate(unixNanoTimestamp int64) time.Time + func UnixTimestamp() int64 + func UnixTimestampDate() time.Time + func UnixTimestampToDate(unixTimestamp int64) time.Time v0.0.3 Feb 17, 2021 Changes in this version + const Day + const Hour + const Minute + const Month + const Week + const Year + var Rander = rand.New(rand.NewSource(time.Now().UnixNano())) + func AorB(condition bool, a, b string) string + func CompareVersion(src, toCompare string) bool + func CompressedHTML(h *template.HTML) + func CopyMap(m map[string]string) map[string]string + func EncodeMD5(value string) string + func GetCurrentTime() time.Time + func GetCurrentTimeStr() string + func GetCurrentTimeUnix() int64 + func InArray(arr []string, str string) bool + func IsDecimals(str ...string) bool + func IsEmail(str ...string) bool + func IsEngishLowCase(str ...string) bool + func IsEnglish(str ...string) bool + func IsEnglishCap(str ...string) bool + func IsID(str ...string) bool + func IsInteger(str ...string) bool + func IsJSON(str string) bool + func IsMobile(str ...string) bool + func IsPwd(str ...string) bool + func IsTelephone(str ...string) bool + func JSON(a interface{}) string + func JsonToStruct(data string, value interface{}) error + func Match(p string, s string) bool + func PackageName(v interface{}) string + func ParseBool(s string) bool + func ParseFloat32(f string) float32 + func ParseHTML(name, tmpl string, param interface{}) template.HTML + func ParseText(name, tmpl string, param interface{}) string + func ParseTime(stringTime string) time.Time + func RandNum(min, max int) int + func RandNumStr(n int) string + func RandOrd(n int) string + func RandStr(n int, letter string) string + func RandString(n int) string + func Random(strings []string) ([]string, error) + func ReplaceAll(s string, oldnew ...string) string + func ReplaceNth(s, old, new string, n int) string + func SetDefault(value, condition, def string) string + func StringToInt(e string) (int, error) + func StructToJson(value interface{}) (res string, err error) + func TimeSincePro(then time.Time, m map[string]string) string + func TimeToUnix(e time.Time) int64 + func ToLowerUnderlinedNamer(name string) string + func UnixToTime(e string) (datatime time.Time, err error) + func Uuid(length int64) string + func WeekDay(t time.Time) string + func WrapURL(u string) string