Versions in this module Expand all Collapse all v1 v1.0.37 Aug 12, 2023 Changes in this version + var DEFAULT_TIME_LOCATION = time.FixedZone("CST", 8 * 3600) + var EmptyJsonArray = StringToBytes("[]") + var EmptyJsonObject = StringToBytes("{}") + var ISO_DATE_TEMPLATE = "2006-01-02" + func AlphaNumeric(s string) string + func BytesToString(b []byte) string + func Chinese(s string) string + func CleanString(origStr string, args ...bool) string + func Contains(list []T, checkItem T) bool + func CsvToInt32s(strValue string) []int32 + func CsvToInt64s(strValue string) []int64 + func DeltaDays(t1, t2 time.Time) int + func FromUnixTime(ts int64, format string) string + func GenerateRandString(n int) string + func Get1stDayOfWeek() string + func GetBeginUnixTS(beginDate string) int64 + func GetBetweenDays(format, beginDate string, args ...string) ([]string, error) + func GetDayBeginTimeSince(ts int64, ndays int) time.Time + func GetDayEndTime(ndays int) time.Time + func GetDayEndTimeSince(ts int64, ndays int) time.Time + func GetEndUnixTS(endDate string) int64 + func GetFuncName(fn any) string + func GetMonthBeginTime(nmonth int) time.Time + func GetMonthBeginTimeSince(ts int64, nmonth int) time.Time + func GetMonthEndTime(nmonth int) time.Time + func GetMonthEndTimeSince(ts int64, nmonth int) time.Time + func GetNeo4jPathPattern(args ...int32) string + func GetPagePositions(data interface{}, pageSize int) [][]int + func GetSliceData(data interface{}) []interface + func GetStructName(myvar interface{}) string + func GetVarName(myvar interface{}) string + func GetYearBeginTime(nyear int) time.Time + func GetYearEndTime(nyear int) time.Time + func Int32sToCsv(int32s []int32) string + func Int64sToCsv(int64s []int64) string + func IsAlphanumeric(s string) bool + func IsImageData(data []byte) bool + func IsNumeric(s string) bool + func IsValidBeginEndTime(strBeginTime, strEndTime string) error + func JsonArray(args ...any) []byte + func JsonObject(args ...any) []byte + func LogDebug(msg string, keyvals ...interface{}) + func LogError(msg string, keyvals ...interface{}) + func LogFatal(msg string, keyvals ...interface{}) + func LogWarn(msg string, keyvals ...interface{}) + func Numeric(s string) string + func ParseArgsWithError(keyvals ...interface{}) (error, map[string]interface{}) + func ParseArgsWithMsgError(keyvals ...interface{}) (string, error, map[string]interface{}) + func ParseStrTime(value string) (*time.Time, error) + func RecordErrorStack(app string) + func RemoveInvisibleCharacter(origStr string) string + func ReverseInt64Slice(numbers []int64) []int64 + func StringToBytes(s string) []byte + func ToBytes(value interface{}) ([]byte, error) + func ToFixed(num float64, precision int) float64 + func ToInt32Slice(strSlice []string) []int32 + func ToInt64Slice(strSlice []string) []int64 + func ToString(value interface{}) (string, error) + type LogLevel string + const LogLevelDebug + const LogLevelError + const LogLevelFatal + const LogLevelWarn