Documentation ¶
Index ¶
- Constants
- Variables
- func AesCBCDecrypt(encrypt, key []byte) ([]byte, error)
- func AesCBCEncrypt(origData, key []byte) ([]byte, error)
- func AesDecryptCBCByKey(encrypt string, key string) (res string, err error)
- func AesDecryptECBByKey(encrypt string, key string) (res string, err error)
- func AesECBDecrypt(data, key []byte) ([]byte, error)
- func AesECBEncrypt(data, key []byte) ([]byte, error)
- func AesEncryptCBCByKey(origData string, key string) (res string, err error)
- func AesEncryptECBByKey(origData string, key string) (res string, err error)
- func ArrayIndexOf(array interface{}, v interface{}) (index int)
- func FirstToLower(str string) (res string)
- func FirstToUpper(str string) (res string)
- func FormatPath(path string) string
- func FormatZapArgs(args ...interface{}) (msg []interface{}, fields []zap.Field)
- func GetAbsolutePath(path string) (absolutePath string)
- func GetDefaultOptions(skip int) (options []zap.Option)
- func GetFileType(fSrc []byte) string
- func GetFormatByTime(v time.Time) string
- func GetIpFromAddr(addr net.Addr) net.IP
- func GetLocalIPList() (ipList []net.IP)
- func GetLock(key string) (lock sync.Locker)
- func GetLogger() *zap.Logger
- func GetMD5(str string) string
- func GetMilliByTime(v time.Time) int64
- func GetNanoByTime(v time.Time) int64
- func GetNow() time.Time
- func GetNowFormat() string
- func GetNowMilli() int64
- func GetNowNano() int64
- func GetNowSecond() int64
- func GetRootDir() string
- func GetSecondByTime(v time.Time) int64
- func GetStringValue(value interface{}) (valueString string)
- func GetTempDir() (dir string, err error)
- func GetUUID() (res string)
- func GetValueByType(valueType reflect.Type, data interface{}) (res interface{}, err error)
- func GzipBytes(data []byte) ([]byte, error)
- func Int64IndexOf(array []int64, v int64) (index int)
- func IntIndexOf(array []int, v int) (index int)
- func IsEmpty(v interface{}) bool
- func IsFalse(v interface{}) (res bool)
- func IsNotEmpty(v interface{}) bool
- func IsNotNull(v interface{}) bool
- func IsNull(v interface{}) bool
- func IsSubPath(parent, child string) (isSub bool, err error)
- func IsTrue(v interface{}) (res bool)
- func JSONDecodeUseNumber(bs []byte, obj interface{}) (err error)
- func JsonToMap(str string) (res map[string]interface{}, err error)
- func JsonToObj(str string, obj interface{}) (err error)
- func LoadDirFilenames(dir string) (filenames []string, err error)
- func LoadDirFiles(dir string) (fileMap map[string][]byte, err error)
- func LockByKey(key string)
- func Marshal(name string) string
- func MilliToTimeText(milli int64) (v string)
- func NewDefaultLogger() *zap.Logger
- func NewLocker() sync.Locker
- func NewLoggerByCallerSkip(skip int) *zap.Logger
- func NewWaitGroup() *sync.WaitGroup
- func NextId() int64
- func ObjToJson(obj interface{}) (res string, err error)
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func PathExists(path string) (bool, error)
- func RandomInt(min int, max int) (res int)
- func RandomInt64(min int64, max int64) (res int64)
- func RandomString(minLen int, maxLen int) (res string)
- func RandomUserName(size int) (res string)
- func Read(reader io.Reader, buf []byte, onRead func(n int) (err error)) (err error)
- func ReadByFunc(read func(p []byte) (n int, err error), buf []byte, ...) (err error)
- func ReadFile(filename string) (bs []byte, err error)
- func ReadFileString(filename string) (str string, err error)
- func ReadLine(filename string) (lines []string, err error)
- func RsaDecrypt(ciphertext []byte, privateKey []byte) ([]byte, error)
- func RsaDecryptByKey(decrypt string, privateKey string) (res string, err error)
- func RsaEncrypt(origData []byte, publicKey []byte) ([]byte, error)
- func RsaEncryptByKey(origData string, publicKey string) (res string, err error)
- func SetIdWorker(worker *IdWorker)
- func SetTempDir(dir string)
- func StrPadLeft(input string, padLength int, padString string) string
- func StrPadRight(input string, padLength int, padString string) string
- func StringIndexOf(array []string, v string) (index int)
- func StringTo[T any](str string, to any) (res T, err error)
- func StringToBytes(str string) []byte
- func StringToFloat64(str string) float64
- func StringToInt(str string) int
- func StringToInt64(str string) int64
- func StringToUint64(str string) uint64
- func SumToString(nums ...interface{}) string
- func TimeFormat(v time.Time, layout string) string
- func To[T any](from any) (res T)
- func UnGzipBytes(data []byte) ([]byte, error)
- func UnZip(zipFile string, destDir string) error
- func UnlockByKey(key string)
- func ValueToFloat64(value any) (res float64, err error)
- func ValueToInt64(value any) (res int64, err error)
- func ValueToUint64(value any) (res uint64, err error)
- func Write(writer io.Writer, buf []byte, onWrite func(n int) (err error)) (err error)
- func WriteFile(filename string, bs []byte) (err error)
- func WriteFileString(filename string, str string) (err error)
- func Zip(srcFile string, destZip string) error
- type Cache
- type CacheGroup
- func (this_ *CacheGroup[T]) Clear()
- func (this_ *CacheGroup[T]) Delete(keys ...string)
- func (this_ *CacheGroup[T]) Get(key string) (T, bool)
- func (this_ *CacheGroup[T]) GetCache(key string) *Cache[T]
- func (this_ *CacheGroup[T]) GetCacheByHash(hashCode uint32) *Cache[T]
- func (this_ *CacheGroup[T]) GetStringHashCode(str string) uint32
- func (this_ *CacheGroup[T]) Put(key string, v T)
- func (this_ *CacheGroup[T]) PutIfAbsent(key string, v T)
- type DirFileInfo
- type DirInfo
- type HashRing
- func (h *HashRing[T]) AddNode(node *HashRingNode[T])
- func (h *HashRing[T]) AddNodes(nodes []*HashRingNode[T])
- func (h *HashRing[T]) GetHash(s string) (res uint32)
- func (h *HashRing[T]) GetNode(s string) (node *HashRingVirtualNode[T])
- func (h *HashRing[T]) RemoveNode(node *HashRingNode[T])
- func (h *HashRing[T]) UpdateNode(node *HashRingNode[T])
- type HashRingNode
- type HashRingVirtualNode
- type IdWorker
- type SSHChanConn
- func (t *SSHChanConn) Close() error
- func (t *SSHChanConn) LocalAddr() net.Addr
- func (t *SSHChanConn) Read(b []byte) (n int, err error)
- func (t *SSHChanConn) RemoteAddr() net.Addr
- func (t *SSHChanConn) SetDeadline(deadline time.Time) error
- func (t *SSHChanConn) SetReadDeadline(deadline time.Time) error
- func (t *SSHChanConn) SetWriteDeadline(deadline time.Time) error
- func (t *SSHChanConn) Write(b []byte) (n int, err error)
- type StringSort
- type StringSortList
- type SyncMap
Constants ¶
const (
// DefaultVirtualNodeSize 默认虚拟节点
DefaultVirtualNodeSize = 400
)
Variables ¶
var ( RandChats = []string{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "z", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "Z", "Y", "Z", "_", } RandChatsSize = len(RandChats) )
var ( FirstName = []string{}/* 292 elements not displayed */ LastName = []string{}/* 350 elements not displayed */ FirstNameLen = len(FirstName) LastNameLen = len(LastName) )
var (
// DefaultTimeFormatLayout 默认时间格式化
DefaultTimeFormatLayout = "2006-01-02 15:04:05"
)
var (
Logger = NewDefaultLogger()
)
Functions ¶
func AesCBCDecrypt ¶ added in v0.0.2
func AesCBCEncrypt ¶ added in v0.0.2
func AesDecryptCBCByKey ¶ added in v0.0.2
AesDecryptCBCByKey AES解密,CBC模式 AesDecryptCBCByKey("这是加密后的文本", "这是密钥")
func AesDecryptECBByKey ¶ added in v0.0.2
AesDecryptECBByKey AES解密,ECB模式 AesDecryptECBByKey("这是加密后的文本", "这是密钥")
func AesECBDecrypt ¶ added in v0.0.2
func AesECBEncrypt ¶ added in v0.0.2
func AesEncryptCBCByKey ¶ added in v0.0.2
AesEncryptCBCByKey AES加密,CBC模式,返回 base64 字符 AesEncryptCBCByKey("这是需要加密的文本", "这是密钥")
func AesEncryptECBByKey ¶ added in v0.0.2
AesEncryptECBByKey AES加密,ECB模式,返回 base64 字符 AesEncryptECBByKey("这是需要加密的文本", "这是密钥")
func ArrayIndexOf ¶ added in v0.0.2
func ArrayIndexOf(array interface{}, v interface{}) (index int)
ArrayIndexOf 返回 某个值 在数组中的索引位置,未找到返回 -1 ArrayIndexOf(["a", "b", "c"], "d")
func FirstToLower ¶ added in v0.0.2
FirstToLower 字符首字母小写 @param str string "任意字符串" @return string FirstToLower("Abc")
func FirstToUpper ¶ added in v0.0.2
FirstToUpper 字符首字母大写 @param str string "任意字符串" @return string FirstToUpper("abc")
func FormatPath ¶ added in v0.0.2
FormatPath 格式化路径 FormatPath("/x/x/xxx\xx\xx")
func FormatZapArgs ¶ added in v0.5.8
func GetAbsolutePath ¶ added in v0.0.2
GetAbsolutePath 获取路径觉得路径 GetAbsolutePath("/x/x/xxx\xx\xx")
func GetDefaultOptions ¶ added in v0.7.1
func GetFileType ¶ added in v0.0.2
GetFileType 用文件前面几个字节来判断 fSrc: 文件字节流(就用前面几个字节)
func GetFormatByTime ¶ added in v0.0.2
GetFormatByTime 获取格式化时间 "2006-01-02 15:04:05" @param v time.Time "时间" GetFormatByTime(time)
func GetLocalIPList ¶ added in v0.0.2
GetLocalIPList 获取当前IP列表
func GetLock ¶ added in v0.0.2
GetLock 获取一个Locker,如果不存在,则新建 obj = GetLock("user:1") obj.Lock() obj.Unlock()
func GetMilliByTime ¶ added in v0.5.7
GetMilliByTime 获取时间戳 到毫秒 @param v time.Time "时间" GetMilliByTime(time)
func GetNanoByTime ¶ added in v0.5.7
GetNanoByTime 获取时间戳 到纳秒 @param v time.Time "时间" GetNanoByTime(time)
func GetNowFormat ¶ added in v0.0.2
func GetNowFormat() string
GetNowFormat 获取当前格式化时间 "2006-01-02 15:04:05" GetNowFormat()
func GetNowSecond ¶ added in v0.0.2
func GetNowSecond() int64
GetNowSecond 获取当前时间戳 到秒 GetNowSecond()
func GetSecondByTime ¶ added in v0.0.2
GetSecondByTime 获取时间戳 到秒 @param v time.Time "时间" GetSecondByTime(time)
func GetStringValue ¶ added in v0.0.2
func GetStringValue(value interface{}) (valueString string)
GetStringValue 将传入的值转为字符串 @param value interface{} "任意值" @return string GetStringValue(arg)
func GetValueByType ¶ added in v0.8.8
func Int64IndexOf ¶ added in v0.0.2
Int64IndexOf 返回 某个值 在数组中的索引位置,未找到返回 -1 Int64IndexOf([1,2,3], 2)
func IntIndexOf ¶ added in v0.0.2
IntIndexOf 返回 某个值 在数组中的索引位置,未找到返回 -1 IntIndexOf([1,2,3], 2)
func IsEmpty ¶ added in v0.0.2
func IsEmpty(v interface{}) bool
IsEmpty 是否为nil或空字符串 @param v interface{} "传入任意值" @return bool IsEmpty(arg)
func IsFalse ¶ added in v0.0.2
func IsFalse(v interface{}) (res bool)
IsFalse 是否为否 判断不是true、"true"、1、"1" @param v interface{} "传入任意值" @return bool IsFalse(arg)
func IsNotEmpty ¶ added in v0.0.2
func IsNotEmpty(v interface{}) bool
IsNotEmpty 是否不为nil或空字符串 @param v interface{} "传入任意值" @return bool IsNotEmpty(arg)
func IsNotNull ¶ added in v0.4.6
func IsNotNull(v interface{}) bool
IsNotNull 是否不为nil或空字符串 @param v interface{} "传入任意值" @return bool IsNotNull(arg)
func IsNull ¶ added in v0.4.6
func IsNull(v interface{}) bool
IsNull 是否为nil @param v interface{} "传入任意值" @return bool IsNull(arg)
func IsTrue ¶ added in v0.0.2
func IsTrue(v interface{}) (res bool)
IsTrue 是否为真 判断是true、"true"、1、"1" @param v interface{} "传入任意值" @return bool IsTrue(arg)
func JSONDecodeUseNumber ¶ added in v0.3.1
func LoadDirFilenames ¶ added in v0.0.2
LoadDirFilenames 加载目录下文件(文件名为相对路径) LoadDirFilenames("/x/x/xxx\xx\xx")
func LoadDirFiles ¶ added in v0.0.2
LoadDirFiles 加载目录下文件 读取文件内容(key为文件名为相对路径) LoadDirFiles("/x/x/xxx\xx\xx")
func LockByKey ¶ added in v0.0.2
func LockByKey(key string)
LockByKey 根据Key进行同步锁 LockByKey("user:1")
func MilliToTimeText ¶ added in v1.2.7
MilliToTimeText 将 毫秒 转为 `xx天xx时xx分xx秒xx毫秒`
func NewDefaultLogger ¶ added in v0.7.1
func NewLocker ¶ added in v0.5.7
NewLocker 创建 Mutex Locker obj = NewLocker() obj.Lock() obj.Unlock()
func NewLoggerByCallerSkip ¶ added in v0.7.1
NewLoggerByCallerSkip 跳过的调用方数量 skip = 1 表示 输出的 文件名 行号等 为上层方法
func NewWaitGroup ¶ added in v0.5.7
NewWaitGroup 创建 WaitGroup , obj = NewWaitGroup() obj.Add(1) obj.Done() obj.Wait()
func NextId ¶ added in v1.0.6
func NextId() int64
NextId 新建一个ID生成器,传入生成器ID NextId() 获取一个 雪花片算法的 ID 其中 workerId 为 默认 0
func PKCS5Padding ¶ added in v0.0.2
func PKCS5UnPadding ¶ added in v0.0.2
func PathExists ¶ added in v0.0.2
PathExists 路径文件是否存在 PathExists("/x/x/xxx\xx\xx")
func RandomInt ¶ added in v0.0.2
RandomInt 获取随机数 @param min int "最小值" @param max int "最大值" @return int "随机数" RandomInt(1, 10)
func RandomInt64 ¶ added in v0.0.2
RandomInt64 获取随机数 @param min int64 "最小值" @param max int64 "最大值" @return int64 "随机数" RandomInt64(1, 10)
func RandomString ¶ added in v0.0.2
RandomString 获取随机字符串 @param minLen int "最小长度" @param maxLen int "最大长度" @return string RandomString(2, 20)
func RandomUserName ¶ added in v0.0.2
RandomUserName 随机姓名 @param size int "名长度" @return string RandomUserName(2)
func ReadByFunc ¶ added in v0.0.2
func ReadFileString ¶ added in v0.0.4
ReadFileString 读取文件内容 返回字符串 ReadFileString("/x/x/xxx\xx\xx")
func RsaDecrypt ¶ added in v0.0.3
func RsaDecryptByKey ¶ added in v0.0.3
RsaDecryptByKey RSA解密 RsaDecryptByKey("这是加密后的文本", "这是密钥")
func RsaEncrypt ¶ added in v0.0.3
func RsaEncryptByKey ¶ added in v0.0.3
RsaEncryptByKey RSA加密,返回 base64 字符 RsaEncryptByKey("这是需要加密的文本", "这是密钥")
func SetIdWorker ¶ added in v1.2.15
func SetIdWorker(worker *IdWorker)
func SetTempDir ¶ added in v0.0.7
func SetTempDir(dir string)
func StrPadLeft ¶ added in v0.5.7
StrPadLeft 在字符串 左侧补全 字符串 到 指定长度 input string 原字符串 padLength int 规定补齐后的字符串长度 padString string 自定义填充字符串 StrPadLeft("xx", 5, "0") 左侧补”0“达到5位长度
func StrPadRight ¶ added in v0.5.7
StrPadRight 在字符串 右侧补全 字符串 到 指定长度 input string 原字符串 padLength int 规定补齐后的字符串长度 padString string 自定义填充字符串 StrPadRight("xx", 5, "0") 右侧补”0“达到5位长度
func StringIndexOf ¶ added in v0.0.2
StringIndexOf 返回 某个值 在数组中的索引位置,未找到返回 -1 StringIndexOf(["a", "b", "c"], "d")
func StringToBytes ¶ added in v0.5.9
StringToBytes 字符串转为 []byte StringToBytes("这是文本")
func StringToFloat64 ¶ added in v0.4.6
StringToFloat64 字符串转 float64 StringToFloat64("11.2")
func StringToInt ¶ added in v0.4.6
StringToInt 字符串转 int StringToInt("11")
func StringToInt64 ¶ added in v0.4.6
StringToInt64 字符串转 int64 StringToInt64("11")
func StringToUint64 ¶ added in v1.1.7
StringToUint64 字符串转 uint64 StringToUint64("11")
func SumToString ¶ added in v0.7.2
func SumToString(nums ...interface{}) string
SumToString 将任意数相加,为防止精度丢失,可以传入数字字符串 SumToString("4611686027042965191", 11)
func TimeFormat ¶ added in v0.0.2
TimeFormat 时间格式化 默认 "2006-01-02 15:04:05" @param v time.Time "时间" @param layout string "格式化字符串,默认使用"2006-01-02 15:04:05"" TimeFormat(time, "2006-01-02 15:04:05")
func UnlockByKey ¶ added in v0.0.2
func UnlockByKey(key string)
UnlockByKey 根据Key进行解锁同步锁 UnlockByKey("user:1")
func ValueToFloat64 ¶ added in v1.2.16
ValueToFloat64 值 转 float64 ValueToFloat64("11")
func ValueToInt64 ¶ added in v1.2.16
ValueToInt64 值 转 int64 ValueToInt64("11")
func ValueToUint64 ¶ added in v1.2.16
ValueToUint64 值 转 uint64 ValueToUint64("11")
func WriteFile ¶ added in v0.0.2
WriteFile 写入文件内容, WriteFile("/x/x/xxx\xx\xx", StringToBytes("这是文本"))
func WriteFileString ¶ added in v0.0.4
WriteFileString 写入文件内容 WriteFileString("/x/x/xxx\xx\xx", "这是文本")
Types ¶
type Cache ¶ added in v1.1.22
type Cache[T any] struct { // contains filtered or unexported fields }
func (*Cache[T]) PutIfAbsent ¶ added in v1.1.22
PutIfAbsent 不存在则新增
type CacheGroup ¶ added in v1.1.22
type CacheGroup[T any] struct { // contains filtered or unexported fields }
func NewCacheGroup ¶ added in v1.1.22
func NewCacheGroup[T any](cacheSize int, obj T) *CacheGroup[T]
func (*CacheGroup[T]) Delete ¶ added in v1.1.22
func (this_ *CacheGroup[T]) Delete(keys ...string)
Delete 删除
func (*CacheGroup[T]) Get ¶ added in v1.1.22
func (this_ *CacheGroup[T]) Get(key string) (T, bool)
func (*CacheGroup[T]) GetCache ¶ added in v1.1.22
func (this_ *CacheGroup[T]) GetCache(key string) *Cache[T]
func (*CacheGroup[T]) GetCacheByHash ¶ added in v1.1.22
func (this_ *CacheGroup[T]) GetCacheByHash(hashCode uint32) *Cache[T]
func (*CacheGroup[T]) GetStringHashCode ¶ added in v1.1.22
func (this_ *CacheGroup[T]) GetStringHashCode(str string) uint32
func (*CacheGroup[T]) Put ¶ added in v1.1.22
func (this_ *CacheGroup[T]) Put(key string, v T)
Put 设置值
func (*CacheGroup[T]) PutIfAbsent ¶ added in v1.1.22
func (this_ *CacheGroup[T]) PutIfAbsent(key string, v T)
PutIfAbsent 不存在则新增
type DirFileInfo ¶ added in v1.1.20
type DirInfo ¶ added in v1.1.20
type DirInfo struct { Path string `json:"path"` Name string `json:"name"` FileSize int64 `json:"fileSize,omitempty"` AllFileSize int64 `json:"allFileSize,omitempty"` DirNumber int `json:"dirNumber,omitempty"` FileNumber int `json:"fileNumber,omitempty"` AllFileNumber int `json:"allFileNumber,omitempty"` AllDirNumber int `json:"allDirNumber,omitempty"` FileInfos []*DirFileInfo `json:"fileInfos,omitempty"` DirInfos []*DirInfo `json:"dirInfos,omitempty"` }
type HashRing ¶ added in v1.2.16
type HashRing[T any] struct { Hash func(s string) uint32 // contains filtered or unexported fields }
HashRing 哈希环 存放 Node
func NewHashRing ¶ added in v1.2.16
NewHashRing 创建 哈希环 指定 虚拟节点数量 默认使用 DefaultVirtualNodeSize
func (*HashRing[T]) AddNode ¶ added in v1.2.16
func (h *HashRing[T]) AddNode(node *HashRingNode[T])
AddNode add node to hash ring
func (*HashRing[T]) AddNodes ¶ added in v1.2.16
func (h *HashRing[T]) AddNodes(nodes []*HashRingNode[T])
AddNodes add nodes to hash ring
func (*HashRing[T]) GetNode ¶ added in v1.2.16
func (h *HashRing[T]) GetNode(s string) (node *HashRingVirtualNode[T])
GetNode get node with key
func (*HashRing[T]) RemoveNode ¶ added in v1.2.16
func (h *HashRing[T]) RemoveNode(node *HashRingNode[T])
RemoveNode remove node
func (*HashRing[T]) UpdateNode ¶ added in v1.2.16
func (h *HashRing[T]) UpdateNode(node *HashRingNode[T])
UpdateNode update node with weight
type HashRingNode ¶ added in v1.2.16
type HashRingNode[T any] struct { // contains filtered or unexported fields }
func NewHashRingNode ¶ added in v1.2.16
func NewHashRingNode[T any](nodeKey string, obj T, weight int) *HashRingNode[T]
NewHashRingNode 创建 一个 哈希环 节点
func (*HashRingNode[T]) GetNode ¶ added in v1.2.16
func (this_ *HashRingNode[T]) GetNode() (res T)
type HashRingVirtualNode ¶ added in v1.2.16
type HashRingVirtualNode[T any] struct { // contains filtered or unexported fields }
type IdWorker ¶ added in v1.0.6
type IdWorker struct {
// contains filtered or unexported fields
}
func NewIdWorker ¶ added in v1.0.6
NewIdWorker 新建一个 雪花片算法 ID生成器,传入生成器ID NewIdWorker(1)
type SSHChanConn ¶ added in v0.4.4
func (*SSHChanConn) Close ¶ added in v0.4.4
func (t *SSHChanConn) Close() error
func (*SSHChanConn) LocalAddr ¶ added in v0.4.4
func (t *SSHChanConn) LocalAddr() net.Addr
func (*SSHChanConn) RemoteAddr ¶ added in v0.4.4
func (t *SSHChanConn) RemoteAddr() net.Addr
func (*SSHChanConn) SetDeadline ¶ added in v0.4.4
func (t *SSHChanConn) SetDeadline(deadline time.Time) error
func (*SSHChanConn) SetReadDeadline ¶ added in v0.4.4
func (t *SSHChanConn) SetReadDeadline(deadline time.Time) error
func (*SSHChanConn) SetWriteDeadline ¶ added in v0.4.4
func (t *SSHChanConn) SetWriteDeadline(deadline time.Time) error
type StringSort ¶ added in v0.3.8
type StringSort interface {
GetName() string
}
type StringSortList ¶ added in v0.3.8
type StringSortList []StringSort
func (StringSortList) Len ¶ added in v0.3.8
func (m StringSortList) Len() int
Len 实现sort.Interface接口的获取元素数量方法
func (StringSortList) Less ¶ added in v0.3.8
func (m StringSortList) Less(i, j int) bool
Less 实现 sort.Interface 接口的比较元素方法
func (StringSortList) Swap ¶ added in v0.3.8
func (m StringSortList) Swap(i, j int)
Swap 实现sort.Interface接口的交换元素方法
type SyncMap ¶ added in v0.2.5
type SyncMap struct {
// contains filtered or unexported fields
}
func NewSyncMap ¶ added in v0.2.5
func NewSyncMap() *SyncMap