Documentation ¶
Index ¶
- Constants
- Variables
- func AbsInt(v int) int
- func AbsInt32(v int32) int32
- func AbsInt64(v int64) int64
- func ArrayContainInt(a []int, f int) bool
- func ArrayContainString(a []string, f string) bool
- func ColorDistance(c1 color.RGBA, c2 color.RGBA) float64
- func CompressData(src []byte) []byte
- func Copy(src, dst string) error
- func CrashLog()
- func DeCompressData(src []byte) ([]byte, error)
- func DumpStacks() string
- func Elapsed(f func(d time.Duration)) func()
- func FileExists(filename string) bool
- func FileFind(filename string, dst string) int
- func FileLineCount(filename string) int
- func FileMd5(filename string) (string, error)
- func FileReplace(filename string, from string, to string) error
- func GenerateTLSConfig(name string) (*tls.Config, error)
- func GetCrc32(data []byte) string
- func GetCrc32String(s string) string
- func GetMd5String(s string) string
- func GetNowUpdateInSecond() time.Time
- func GetOutboundIP() (net.IP, error)
- func GetXXHashString(s string) string
- func Guid() string
- func GunzipString(data string) string
- func GzipString(data string) string
- func GzipStringBestCompression(data string) string
- func GzipStringBestSpeed(data string) string
- func HIINT16(I int32) int16
- func HIINT32(I int64) int32
- func HasInt(data []int, dst int) bool
- func HasString(data []string, dst string) bool
- func HashString(s string) uint32
- func Hex2Num(str string, n int) int
- func Int32ArrayToString(a []int32, delim string) string
- func Int64ArrayToString(a []int64, delim string) string
- func IntArrayToString(a []int, delim string) string
- func IsInt(r float64) bool
- func IsSymlink(filename string) bool
- func LOINT16(l int32) int16
- func LOINT32(l int64) int32
- func LoadJson(filename string, conf interface{}) error
- func LoadProtobuf(filename string) (error, []protoreflect.FileDescriptor)
- func LoadProtobufMethods(filename string) (error, []protoreflect.MethodDescriptor)
- func MAKEINT32(high int16, low int16) int32
- func MAKEINT64(high int32, low int32) int64
- func MaxOfInt(vars ...int) int
- func MaxOfInt64(vars ...int64) int64
- func MessageToFullJson(mi protoreflect.MessageDescriptor) (error, string)
- func MinOfInt(vars ...int) int
- func MinOfInt64(vars ...int64) int64
- func NearlyEqual(a int, b int) bool
- func NumToHex(num, n int) string
- func RandInt() int32
- func RandInt31n(n int) int32
- func RandStr(l int) string
- func Rc4(key string, src []byte) ([]byte, error)
- func SafeDivide(a int64, b int64) int64
- func SaveJson(filename string, conf interface{}) error
- func Shuffle(n int, swap func(i, j int))
- func Sleep(sec int)
- func StructToTable(v interface{}) string
- func UniqueId() string
- func Walk(path string, walkFn filepath.WalkFunc) error
- func WrapString(s string, n int) string
- type Channel
- type StrTable
- type StrTableLine
Constants ¶
View Source
const ( LITTLE_LETTERS = 36 FULL_LETTERS = 62 )
Variables ¶
View Source
var Black = color.RGBA{0, 0, 0, 0}
View Source
var Blue = color.RGBA{0, 0, 255, 0}
View Source
var Cyan = color.RGBA{0, 255, 255, 0}
View Source
var Gray = color.RGBA{128, 128, 128, 0}
View Source
var Green = color.RGBA{0, 128, 0, 0}
View Source
var Lime = color.RGBA{0, 255, 0, 0}
View Source
var Magenta = color.RGBA{255, 0, 255, 0}
View Source
var Maroon = color.RGBA{128, 0, 0, 0}
View Source
var Olive = color.RGBA{128, 128, 0, 0}
View Source
var Purple = color.RGBA{128, 0, 128, 0}
View Source
var Red = color.RGBA{255, 0, 0, 0}
View Source
var Silver = color.RGBA{192, 192, 192, 0}
View Source
var Teal = color.RGBA{0, 128, 128, 0}
View Source
var White = color.RGBA{255, 255, 255, 0}
View Source
var Yellow = color.RGBA{255, 255, 0, 0}
Functions ¶
func ArrayContainInt ¶
func ArrayContainString ¶
func CompressData ¶
func DeCompressData ¶
func DumpStacks ¶
func DumpStacks() string
func FileExists ¶
func FileLineCount ¶
func GenerateTLSConfig ¶
GenerateTLSConfig Set up a bare-bones TLS config for the server
func GetCrc32String ¶
func GetMd5String ¶
func GetNowUpdateInSecond ¶
func GetOutboundIP ¶
func GetXXHashString ¶
func GunzipString ¶
func GzipString ¶
func GzipStringBestSpeed ¶
func HashString ¶
func Int32ArrayToString ¶
func Int64ArrayToString ¶
func IntArrayToString ¶
func LoadProtobuf ¶
func LoadProtobuf(filename string) (error, []protoreflect.FileDescriptor)
func LoadProtobufMethods ¶
func LoadProtobufMethods(filename string) (error, []protoreflect.MethodDescriptor)
func MaxOfInt64 ¶
func MessageToFullJson ¶
func MessageToFullJson(mi protoreflect.MessageDescriptor) (error, string)
func MinOfInt64 ¶
func NearlyEqual ¶
func RandInt31n ¶
func SafeDivide ¶
func StructToTable ¶
func StructToTable(v interface{}) string
func WrapString ¶
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func NewChannel ¶
func (*Channel) WriteTimeout ¶
type StrTable ¶
type StrTable struct {
// contains filtered or unexported fields
}
func (*StrTable) AddLine ¶
func (s *StrTable) AddLine(l StrTableLine)
func (*StrTable) FromStruct ¶
type StrTableLine ¶
type StrTableLine struct {
// contains filtered or unexported fields
}
func (*StrTableLine) AddData ¶
func (s *StrTableLine) AddData(d string)
func (*StrTableLine) FromStruct ¶
func (s *StrTableLine) FromStruct(st *StrTable, v interface{}, trans func(name string, v interface{}) interface{})
Click to show internal directories.
Click to hide internal directories.