Versions in this module Expand all Collapse all v1 v1.0.1 Aug 31, 2023 Changes in this version + const BYTE + const EXABYTE + const GIGABYTE + const HalfOffset + const KILOBYTE + const MEGABYTE + const PETABYTE + const TERABYTE + const TimeOffset + var ServerIP = "" + func AesDecrypt(data []byte, key []byte) ([]byte, error) + func AesEncrypt(data []byte, key []byte) ([]byte, error) + func Base64Decode(data string) string + func Base64Encode(data string) string + func Batch(fn func(T) V, ts []T) []V + func BothExist(es ...[]E) []E + func BothExistAny(es [][]E, fn func(e E) K) []E + func ByteSize(bytes uint64) string + func Complete(a []E, b []E) bool + func Contain(e E, es ...E) bool + func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) + func Delete(es []E, index ...int) []E + func DeleteAt(es *[]E, index ...int) []E + func Difference(slice1, slice2 []int64) []int64 + func DifferenceString(slice1, slice2 []string) []string + func Distinct(ts []T) []T + func DistinctAny(es []E, fn func(e E) K) []E + func DistinctAnyGetComparable(es []E, fn func(e E) K) []K + func Duplicate(es []E) bool + func DuplicateAny(es []E, fn func(e E) K) bool + func Equal(a []E, b []E) bool + func Filter(es []E, fn func(e E) (T, bool)) []T + func GenConversationIDForSingle(sendID, recvID string) string + func GenConversationUniqueKeyForGroup(groupID string) string + func GenConversationUniqueKeyForSingle(sendID, recvID string) string + func GenGroupConversationID(groupID string) string + func GenID() string + func GenIDs(count int) []string + func GenSmallImage(src, dst string) error + func GetCurDayHalfTimeFormat() string + func GetCurDayHalfTimestamp() int64 + func GetCurDayZeroTimeFormat() string + func GetCurDayZeroTimestamp() int64 + func GetCurrentTimestampByMill() int64 + func GetCurrentTimestampByNano() int64 + func GetCurrentTimestampBySecond() int64 + func GetFuncName(skips ...int) string + func GetHashCode(s string) uint32 + func GetLocalIP() (string, error) + func GetMsgID(sendID string) string + func GetNotificationConversationIDByConversationID(conversationID string) string + func GetSelfFuncName() string + func GetSelfNotificationConversationID(userID string) string + func GetSeqsBeginEnd(seqs []int64) (int64, int64) + func GetSwitchFromOptions(Options map[string]bool, key string) (result bool) + func GetTimeStampByFormat(datetime string) string + func HasKey(m map[K]V, k K) bool + func If(isa bool, a, b T) T + func IndexAny(e E, es []E, fn func(e E) K) int + func IndexOf(e E, es ...E) int + func InitMap(val *map[K]V) + func InitSlice(val *[]T) + func Int32ToString(i int32) string + func Int64ToString(i int64) string + func IntToString(i int) string + func InterfaceArrayToStringArray(data []interface{}) (i []string) + func Intersect(slice1, slice2 []int64) []int64 + func IntersectString(slice1, slice2 []string) []string + func IsContain(target string, List []string) bool + func IsContainInt(target int, List []int) bool + func IsContainInt32(target int32, List []int32) bool + func IsDir(path string) bool + func IsDuplicateStringSlice(arr []string) bool + func IsFile(path string) bool + func JsonStringToMap(str string) (tempMap map[string]int32) + func JsonStringToStruct(s string, args interface{}) error + func Keys(kv map[K]V) []K + func MapIntToJsonString(param map[string]int32) string + func MapToJsonString(param map[string]interface{}) string + func Max(e ...E) E + func Md5(s string, salt ...string) string + func Min(e ...E) E + func MkDir(path string) error + func NotNilReplace(old, new_ *T) + func OperationIDGenerator() string + func Order(es []E, ts []T, fn func(t T) E) []T + func OrderPtr(es []E, ts *[]T, fn func(t T) E) []T + func Paginate(es []E, pageNumber int, showNumber int) []E + func RemoveDuplicate(arr []T) []T + func RemoveDuplicateElement(idList []string) []string + func SetSwitchFromOptions(options map[string]bool, key string, value bool) + func Single(a, b []E) []E + func Slice(es []E, fn func(e E) T) []T + func SliceAnySub(a, b []E, fn func(t E) T) []E + func SliceSet(es []E) map[E]struct + func SliceSetAny(es []E, fn func(e E) K) map[K]struct + func SliceSub(a, b []E) []E + func SliceSubAny(a []E, b []T, fn func(t T) E) []E + func SliceToMap(es []E, fn func(e E) K) map[K]E + func SliceToMapAny(es []E, fn func(e E) (K, V)) map[K]V + func SliceToMapOkAny(es []E, fn func(e E) (K, V, bool)) map[K]V + func Sort(es []E, asc bool) []E + func SortAny(es []E, fn func(a, b E) bool) + func StringToInt(i string) int + func StringToInt32(i string) int32 + func StringToInt64(i string) int64 + func StructToJsonBytes(param interface{}) []byte + func StructToJsonString(param interface{}) string + func TimeStringFormatTimeUnix(timeFormat string, timeSrc string) int64 + func TimeStringToTime(timeString string) (time.Time, error) + func TimeToString(t time.Time) string + func ToPtr(t T) *T + func Uint32ToString(i uint32) string + func UniqueJoin(s ...string) string + func UnixMillSecondToTime(millSecond int64) time.Time + func UnixNanoSecondToTime(nanoSecond int64) time.Time + func UnixSecondToTime(second int64) time.Time + func Unwrap(err error) error + func Values(kv map[K]V) []V + func WithMessage(err error, message string) error + func Wrap(err error, message string) error + func Wrap1(err error) error + func Wrap2(a T, err error) (T, error) + func Wrap3(a T, b V, err error) (T, V, error) + type Map struct + func (m *Map) Del(key interface{}) + func (m *Map) Get(key interface{}) interface{} + func (m *Map) Len() int + func (m *Map) LockRange(f func(interface{}, interface{})) + func (m *Map) RLockRange(f func(interface{}, interface{})) + func (m *Map) Set(key interface{}, value interface{}) + func (m *Map) TestAndSet(key interface{}, value interface{}) interface{} + func (m *Map) UnsafeDel(key interface{}) + func (m *Map) UnsafeGet(key interface{}) interface{} + func (m *Map) UnsafeLen() int + func (m *Map) UnsafeRange(f func(interface{}, interface{})) + func (m *Map) UnsafeSet(key interface{}, value interface{}) + type Ordered interface