Documentation ¶
Index ¶
- func B2S(b []byte) string
- func BytesToInt64(buf []byte) int64
- func DecodeBIG5(s []byte) ([]byte, error)
- func DecodeGBK(s []byte) ([]byte, error)
- func Delay(i, j int64)
- func DelayRand(i, j int64) int64
- func Detect(b []byte) (*chardet.Result, error)
- func EncodeBIG5(s []byte) ([]byte, error)
- func GetCurrentExecDir() (dir string, err error)
- func GetCurrentPath() (string, error)
- func GetFileSize(fullFilename string) int64
- func GetOutboundIP() (net.IP, error)
- func Int32ToString(n int32) string
- func Int64ToBytes(i int64) []byte
- func LowercaseBytes(b []byte)
- func RandString(n int) string
- func S2B(s string) (b []byte)
- func SaveTOML(v interface{}, filename string) error
- func StrBuilder(args ...string) string
- func SubString(str string, begin, length int) (substr string)
- func TomlDecode(data []byte, v interface{}) error
- func TomlEncode(v interface{}) ([]byte, error)
- func TransToUTF(input []byte) (output []byte, err error)
- func WriteToFile(c []byte, filename string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func B2S ¶
b2s converts byte slice to a string without memory allocation. See https://groups.google.com/forum/#!msg/Golang-Nuts/ENgbUzYvCuU/90yGx7GUAgAJ .
Note it may break if string and/or slice header will change in the future go versions.
func GetCurrentExecDir ¶
GetCurrentExecDir get exec dir
func GetCurrentPath ¶
GetCurrentPath get current path of commend running
func GetOutboundIP ¶
GetOutboundIP Get preferred outbound ip of this machine
func RandString ¶
func S2B ¶
s2b converts string to a byte slice without memory allocation.
Note it may break if string and/or slice header will change in the future go versions.
func TransToUTF ¶
TransToUTF translate code to simplechinese
func WriteToFile ¶
WriteToFile write []byte to file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.