Documentation ¶
Index ¶
- Constants
- func ByteConvertString(in []byte) (str string)
- func ByteConvertUint16(in []byte) (n uint16)
- func ByteConvertUint32(in []byte) (n uint32)
- func CallStack(pre string, skip int) string
- func CreateDir(dirPath string) (err error)
- func CreateDirv2(dirPath string) (err error)
- func CreateFile(fp string, body []byte) (err error)
- func DateStr2Ts(ds string) int64
- func DebugByte(in []byte) (str string)
- func FileMd5(fileName string) (sMd5 string, err error)
- func GetDate() (cur_date string)
- func GetDateTime() (cur_datetime string)
- func GetDateTimeByFormat(format string) (cur_datetime string)
- func GetDayMin() (min int)
- func GetDaySec() (sec int)
- func GetDays(year, month int64) (days int64)
- func GetHMBYMin(sec int) (h, min int)
- func GetHMBYSec(sec int) (h, min int)
- func GetIID() uint64
- func GetIPAddr(n net.Addr) string
- func GetIPAddrByName(dev string) (ips []string, err error)
- func GetPort(n net.Addr) (port string)
- func GetPortInt32(n net.Addr) (port int32)
- func GetRandPasswd(length int, ct string) string
- func GetRemoteIPPort(n net.Addr) (ip string, port int32)
- func GetTimeMs() int64
- func GetTimeNs() int64
- func GetTimeSec() int64
- func GetTimeUs() int64
- func GetUTCDate() (cur_date string)
- func GetUTCDateTime() (cur_datetime string)
- func GetUTCTimeMs() int64
- func GetUTCTimeNs() int64
- func GetUTCTimeSec() int64
- func GetUTCTimeUs() int64
- func GetYear() int
- func IsDir(p string) bool
- func IsFile(p string) bool
- func LoadFileToByte(filePath string) (d []byte, err error)
- func PathIsExist(p string) bool
- func RandRange(max int) int
- func RemoveDuplicatesAndEmptyString(in []string) (ret []string)
- func RemoveDuplicatesInt(in []int) (ret []int)
- func Round(val float64, places int) float64
- func Sleep(Sec int)
- func SleepMs(ms int64)
- func SleepUs(us int64)
- func TimeStamp2DateStr(tsSec int64) string
- func TimerFunc(seconds int, callFunc func()) *time.Timer
- func Ts2Date(tsSec int64) (date uint32)
- func Ts2Ymd(tsSec int64) (year, month, days int)
- func Uint16ConvertByte(v uint16) (out []byte)
- func Uint32ConvertByte(v uint32) (out []byte)
- func ValueIsExist(array interface{}, lv interface{}) bool
- func WaitCtrlC()
- type Timer
Constants ¶
View Source
const ( NUmStr = "0123456789" CharStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" SpecStr = "+=-@#~,.[]()!%^*$" )
Variables ¶
This section is empty.
Functions ¶
func ByteConvertString ¶
ByteConvertString byte conver to string
func CreateDirv2 ¶
func CreateFile ¶
CreateFile create or update file
func GetDateTimeByFormat ¶
GetDateTimeByFormat return string datetime in format.
func GetUTCDateTime ¶
func GetUTCDateTime() (cur_datetime string)
GetUTCDateTime format: 2006-01-02 15:04:05
func RemoveDuplicatesAndEmptyString ¶
RemoveDuplicatesAndEmptyString .
Types ¶
Click to show internal directories.
Click to hide internal directories.