Documentation ¶
Index ¶
- func BuildLongString(src []byte) []byte
- func BuildString(src []byte) []byte
- func BytesCombine(pBytes ...[]byte) []byte
- func CheckErr(err error)
- func CompareBytes(a []byte, b []byte) bool
- func Decode(data []byte, to interface{}) error
- func Encode(data interface{}) ([]byte, error)
- func GetExePath() (string, error)
- func GetIP() string
- func GetUint16(b []byte) uint16
- func GetUint16BE(b []byte) uint16
- func GetUint32(b []byte) uint32
- func GetUint32BE(b []byte) uint32
- func GetUint64(b []byte) uint64
- func GetUint64BE(b []byte) uint64
- func IPToUint32(s string) (uint32, error)
- func IntAbs(num int) int
- func IsAllNumber(str string) bool
- func IsSameLan(a []byte, b []byte) bool
- func IsSameName(dest, src []byte) bool
- func RandInt16(min, max int16) int16
- func RandInt32(min, max int32) int32
- func RandInt64(min, max int64) int64
- func ReadString(b []byte, offset *int, len int) []byte
- func ReadUint16(b []byte, offset *int) uint16
- func ReadUint16BE(b []byte, offset *int) uint16
- func ReadUint32(b []byte, offset *int) uint32
- func ReadUint32Array(b []byte, offset *int, len int) []uint32
- func ReadUint32BE(b []byte, offset *int) uint32
- func ReadUint64(b []byte, offset *int) uint64
- func ReadUint64BE(b []byte, offset *int) uint64
- func ReadUint8(b []byte, offset *int) uint8
- func ScanLine() (line string)
- func SendEmailTO(mail *EmailData) error
- func SlideIP(s string) int
- func Ternary(b bool, t, f interface{}) interface{}
- func WriteLongString(dest *[]byte, src []byte, offset *int) int
- func WriteString(dest *[]byte, src []byte, offset *int) int
- func WriteUint16(b *[]byte, i uint16, offset *int)
- func WriteUint16BE(b *[]byte, i uint16, offset *int)
- func WriteUint32(b *[]byte, i uint32, offset *int)
- func WriteUint32Array(b *[]byte, a []uint32, offset *int)
- func WriteUint32BE(b *[]byte, i uint32, offset *int)
- func WriteUint64(b *[]byte, i uint64, offset *int)
- func WriteUint64BE(b *[]byte, i uint64, offset *int)
- func WriteUint8(b *[]byte, i uint8, offset *int)
- type BloomFilter
- type EmailData
- type IniParser
- func (this *IniParser) IniGetFloat32(section string, key string) float32
- func (this *IniParser) IniGetFloat64(section string, key string) float64
- func (this *IniParser) IniGetInt32(section string, key string) int32
- func (this *IniParser) IniGetInt64(section string, key string) int64
- func (this *IniParser) IniGetString(section string, key string) string
- func (this *IniParser) IniGetUint32(section string, key string) uint32
- func (this *IniParser) IniGetUint64(section string, key string) uint64
- func (this *IniParser) LoadIni(config_file_name string) error
- type IniParserError
- type SimpleHash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildLongString ¶ added in v0.1.9
BuildLongString 构建长字符串消息,包含2字节的字符串大小
func BuildString ¶ added in v0.1.9
BuildString 构建长字符串消息,包含2字节的字符串大小
func CompareBytes ¶ added in v0.1.9
CompareBytes 比较两个数组是否内容相等,相等返回true
func IsAllNumber ¶ added in v0.3.0
func IsSameName ¶ added in v0.3.0
IsSameName 检查dest是否与src字符串像差不多
func ReadString ¶
ReadString 大端不会读取长度,需要单独先读取长度
func ReadUint32Array ¶ added in v0.1.8
ReadUint32Array 读取数据到uint32数组
func SendEmailTO ¶ added in v0.3.0
func WriteLongString ¶ added in v0.3.8
WriteLongString 写入字符串,包括2字节长度
func WriteString ¶
WriteString 写入字符串,包括长度
func WriteUint16BE ¶
WriteUint16BE 写入2字节uint16,大端模式
func WriteUint32Array ¶ added in v0.1.8
WriteUint32Array 写入uint32数组
func WriteUint32BE ¶
WriteUint32BE 写入4字节uint32,大端模式
func WriteUint64BE ¶
WriteUint64BE 写入8字节uint64,大端模式
Types ¶
type BloomFilter ¶ added in v0.3.0
type BloomFilter struct { Size uint Set *bitset.BitSet Funcs []SimpleHash }
func NewBloomFilter ¶ added in v0.3.0
func NewBloomFilter(size uint, seeds []uint) *BloomFilter
NewBloomFilter 新建一个bloomfilter
func (BloomFilter) Contains ¶ added in v0.3.0
func (bf BloomFilter) Contains(value string) bool
Contains 是否可能存在
type IniParser ¶ added in v0.3.0
type IniParser struct {
// contains filtered or unexported fields
}
func (*IniParser) IniGetFloat32 ¶ added in v0.3.0
func (*IniParser) IniGetFloat64 ¶ added in v0.3.0
func (*IniParser) IniGetInt32 ¶ added in v0.3.0
func (*IniParser) IniGetInt64 ¶ added in v0.3.0
func (*IniParser) IniGetString ¶ added in v0.3.0
func (*IniParser) IniGetUint32 ¶ added in v0.3.0
func (*IniParser) IniGetUint64 ¶ added in v0.3.0
type IniParserError ¶ added in v0.3.0
type IniParserError struct {
// contains filtered or unexported fields
}
func (*IniParserError) Error ¶ added in v0.3.0
func (e *IniParserError) Error() string
type SimpleHash ¶ added in v0.3.0
type SimpleHash struct {
// contains filtered or unexported fields
}
func (SimpleHash) Hash ¶ added in v0.3.0
func (s SimpleHash) Hash(value string) uint
Source Files ¶
Click to show internal directories.
Click to hide internal directories.