Versions in this module Expand all Collapse all v0 v0.1.1 Jul 22, 2022 v0.1.0 Jul 22, 2022 Changes in this version + func BytesToString(b []byte) string + func ConcatString(s ...string) string + func Extract(hostPort string, lis net.Listener) (string, error) + func ExtractHostPort(addr string) (host string, port uint64, err error) + func GenShortID() (string, error) + func GetAvatarURL(cdnURL, key string) string + func GetBytes(key interface{}) ([]byte, error) + func GetDate() string + func GetDefaultAvatarURL(cdnURL string) string + func GetHostname() string + func GetInternalIP() string + func GetLocalIP() string + func GetQiNiuPublicAccessURL(cdnURL, path string) string + func GetRealIP(r *http.Request) (ip string) + func GetShowTime(ts time.Time) string + func GetTodayDateInt() int + func IsEmpty(s string) bool + func IsInSlice(value interface{}, sli interface{}) bool + func IsZero(i ...interface{}) bool + func JoinInt(is []int64) string + func Md5(str string) (string, error) + func Port(lis net.Listener) (int, bool) + func RandomStr(n int) string + func RegexpReplace(reg, src, temp string) string + func SliceShuffle(slice []interface{}) + func SplitInt(s string) ([]int64, error) + func StringSliceContains(ss []string, s string) bool + func StringSliceEqual(a, b []string) bool + func StringSliceReflectEqual(a, b []string) bool + func StringToBytes(s string) []byte + func StringToInt(str string) (int, error) + func StringToInt64(str string) (int64, error) + func StringToUint64(str string) (uint64, error) + func TimeLayout() string + func TimeToShortString(ts time.Time) string + func TimeToString(ts time.Time) string + func Uint64DeleteElemInSlice(i int, s []uint64) []uint64 + func Uint64DeleteElemInSliceWithOrder(i int, s []uint64) []uint64 + func Uint64ShuffleSlice(a []uint64) []uint64 + func Uint64SliceReverse(a []uint64) []uint64 + type Pagination struct + PageSize int + Request *http.Request + Total int + func NewPagination(req *http.Request, total int, pageSize int) *Pagination + func (p *Pagination) Pages() string