Versions in this module Expand all Collapse all v0 v0.1.7 Dec 11, 2020 Changes in this version + const COMPARE_BOTH_KEYVALUE + const COMPARE_ONLY_KEY + const COMPARE_ONLY_VALUE + type LkkArrCompareType uint8 type LkkArray + func (ka *LkkArray) DeleteSliceItems(val interface{}, ids ...int) (res []interface{}, del int) type LkkNumber + func (kn *LkkNumber) IsNaturalRange(arr []int, strict bool) (res bool) + func (kn *LkkNumber) Log(x, y float64) float64 v0.1.5 Nov 24, 2020 Changes in this version + const CASE_LOWER + const CASE_NONE + const CASE_UPPER + const CHECK_CONNECT_TIMEOUT + const DYNAMIC_KEY_LEN + const FILE_COVER_ALLOW + const FILE_COVER_DENY + const FILE_COVER_IGNORE + const FILE_TREE_ALL + const FILE_TREE_DIR + const FILE_TREE_FILE + const FILE_TYPE_ANY + const FILE_TYPE_COMMON + const FILE_TYPE_LINK + const FILE_TYPE_REGULAR + const FLOAT_DECIMAL + const INT64_MAX + const INT64_MIN + const INT_MAX + const INT_MIN + const PAD_BOTH + const PAD_LEFT + const PAD_RIGHT + const PATTERN_ALPHA_LOWER + const PATTERN_ALPHA_NUMERIC + const PATTERN_ALPHA_UPPER + const PATTERN_ASCII + const PATTERN_BASE64 + const PATTERN_BASE64_IMAGE + const PATTERN_CHINESE_ALL + const PATTERN_CHINESE_NAME + const PATTERN_CREDIT_NO + const PATTERN_DATETIME + const PATTERN_DNSNAME + const PATTERN_EMAIL + const PATTERN_EMOJI + const PATTERN_FLOAT + const PATTERN_FULLWIDTH + const PATTERN_HALFWIDTH + const PATTERN_HEXCOLOR + const PATTERN_HTML_TAGS + const PATTERN_MD5 + const PATTERN_MOBILECN + const PATTERN_MULTIBYTE + const PATTERN_PHONE + const PATTERN_RGBCOLOR + const PATTERN_SHA1 + const PATTERN_SHA256 + const PATTERN_SHA512 + const PATTERN_TELEPHONE + const PATTERN_TEL_4800 + const PATTERN_TEL_FIX + const PATTERN_USERNAMEEN + const PATTERN_WHITESPACE_ALL + const PATTERN_WHITESPACE_DUPLICATE + const PATTERN_WHITESPACE_HAS + const PATTERN_WORD + const PKCS_NONE + const PKCS_SEVEN + const PKCS_ZERO + const RAND_STRING_ALPHA + const RAND_STRING_ALPHANUM + const RAND_STRING_CHINESE + const RAND_STRING_NUMERIC + const RAND_STRING_SPECIAL + const UINT64_MAX + const UINT64_MIN + const UINT_MAX + const UINT_MIN + const Version + var CreditArea = map[string]string + var KArr LkkArray + var KConv LkkConvert + var KDbug LkkDebug + var KDelimiter = "$@#KSYS#@$" + var KEncr LkkEncrypt + var KFile LkkFile + var KNum LkkNumber + var KOS LkkOS + var KPrivCidrs []*net.IPNet + var KStr LkkString + var KTime LkkTime + var Kuptime = time.Now() + var RegAlphaLower = regexp.MustCompile(PATTERN_ALPHA_LOWER) + var RegAlphaNumeric = regexp.MustCompile(PATTERN_ALPHA_NUMERIC) + var RegAlphaUpper = regexp.MustCompile(PATTERN_ALPHA_UPPER) + var RegBase64 = regexp.MustCompile(PATTERN_BASE64) + var RegBase64Image = regexp.MustCompile(PATTERN_BASE64_IMAGE) + var RegChineseAll = regexp.MustCompile(PATTERN_CHINESE_ALL) + var RegChineseName = regexp.MustCompile(PATTERN_CHINESE_NAME) + var RegCreditno = regexp.MustCompile(PATTERN_CREDIT_NO) + var RegDNSname = regexp.MustCompile(PATTERN_DNSNAME) + var RegDatetime = regexp.MustCompile(PATTERN_DATETIME) + var RegEmail = regexp.MustCompile(PATTERN_EMAIL) + var RegEmoji = regexp.MustCompile(PATTERN_EMOJI) + var RegFloat = regexp.MustCompile(PATTERN_FLOAT) + var RegFormatDir = regexp.MustCompile(`[\/]{2,}`) + var RegFullWidth = regexp.MustCompile(PATTERN_FULLWIDTH) + var RegHalfWidth = regexp.MustCompile(PATTERN_HALFWIDTH) + var RegHexcolor = regexp.MustCompile(PATTERN_HEXCOLOR) + var RegHtmlTag = regexp.MustCompile(PATTERN_HTML_TAGS) + var RegMd5 = regexp.MustCompile(PATTERN_MD5) + var RegMobilecn = regexp.MustCompile(PATTERN_MOBILECN) + var RegMultiByte = regexp.MustCompile(PATTERN_MULTIBYTE) + var RegPhone = regexp.MustCompile(PATTERN_PHONE) + var RegRgbcolor = regexp.MustCompile(PATTERN_RGBCOLOR) + var RegSha1 = regexp.MustCompile(PATTERN_SHA1) + var RegSha256 = regexp.MustCompile(PATTERN_SHA256) + var RegSha512 = regexp.MustCompile(PATTERN_SHA512) + var RegTelephone = regexp.MustCompile(PATTERN_TELEPHONE) + var RegUrlBackslashDuplicate = regexp.MustCompile(`([^:])[\/]{2,}`) + var RegUsernameen = regexp.MustCompile(PATTERN_USERNAMEEN) + var RegWhitespace = regexp.MustCompile(`\s`) + var RegWhitespaceAll = regexp.MustCompile(PATTERN_WHITESPACE_ALL) + var RegWhitespaceDuplicate = regexp.MustCompile(PATTERN_WHITESPACE_DUPLICATE) + var RegWhitespaceHas = regexp.MustCompile(PATTERN_WHITESPACE_HAS) + var RegWord = regexp.MustCompile(PATTERN_WORD) + var TextHtmlExcludeTags = []string + func CallFunc(f interface{}, args ...interface{}) (results []interface{}, err error) + func ValidFunc(f interface{}, args ...interface{}) (vf reflect.Value, vargs []reflect.Value, err error) + type BiosInfo struct + Date string + Vendor string + Version string + type BoardInfo struct + AssetTag string + Name string + Serial string + Vendor string + Version string + type CallBack func() + type CpuInfo struct + Cache uint + Cores uint + Cpus uint + Model string + Speed string + Threads uint + Vendor string + type FileFilter func(string) bool + type LkkArray byte + func (ka *LkkArray) ArrayChunk(arr interface{}, size int) [][]interface{} + func (ka *LkkArray) ArrayColumn(arr interface{}, columnKey string) []interface{} + func (ka *LkkArray) ArrayDiff(arr1, arr2 interface{}) []interface{} + func (ka *LkkArray) ArrayFill(value interface{}, num int) []interface{} + func (ka *LkkArray) ArrayFlip(arr interface{}) map[interface{}]interface{} + func (ka *LkkArray) ArrayIntersect(arr1, arr2 interface{}, compKey bool) map[interface{}]interface{} + func (ka *LkkArray) ArrayKeyExists(key interface{}, arr interface{}) bool + func (ka *LkkArray) ArrayKeys(arr interface{}) []interface{} + func (ka *LkkArray) ArrayPad(arr interface{}, size int, item interface{}) []interface{} + func (ka *LkkArray) ArrayPop(s *[]interface{}) interface{} + func (ka *LkkArray) ArrayPush(s *[]interface{}, elements ...interface{}) int + func (ka *LkkArray) ArrayRand(arr interface{}, num int) []interface{} + func (ka *LkkArray) ArrayReverse(arr interface{}) []interface{} + func (ka *LkkArray) ArraySearchItem(arr interface{}, condition map[string]interface{}) (res interface{}) + func (ka *LkkArray) ArraySearchMutil(arr interface{}, condition map[string]interface{}) (res []interface{}) + func (ka *LkkArray) ArrayShift(s *[]interface{}) interface{} + func (ka *LkkArray) ArraySlice(arr interface{}, offset, size int) []interface{} + func (ka *LkkArray) ArrayUnique(arr interface{}) []interface{} + func (ka *LkkArray) ArrayUnshift(s *[]interface{}, elements ...interface{}) int + func (ka *LkkArray) ArrayValues(arr interface{}, filterNil bool) []interface{} + func (ka *LkkArray) Implode(delimiter string, arr interface{}) string + func (ka *LkkArray) InArray(needle interface{}, haystack interface{}) bool + func (ka *LkkArray) InInt64Slice(i int64, list []int64) bool + func (ka *LkkArray) InIntSlice(i int, list []int) bool + func (ka *LkkArray) InStringSlice(str string, list []string) bool + func (ka *LkkArray) IsArrayOrSlice(val interface{}, chkType uint8) int + func (ka *LkkArray) IsEqualArray(expected, actual interface{}) bool + func (ka *LkkArray) IsMap(val interface{}) bool + func (ka *LkkArray) JoinInts(ints []int, delimiter string) (res string) + func (ka *LkkArray) JoinStrings(strs []string, delimiter string) (res string) + func (ka *LkkArray) MergeMap(key2Str bool, ss ...interface{}) map[interface{}]interface{} + func (ka *LkkArray) MergeSlice(filterNil bool, ss ...interface{}) []interface{} + func (ka *LkkArray) Unique64Ints(ints []int64) (res []int64) + func (ka *LkkArray) UniqueInts(ints []int) (res []int) + func (ka *LkkArray) UniqueStrings(strs []string) (res []string) + type LkkCaseSwitch uint8 + type LkkConvert byte + func (kc *LkkConvert) BaseConvert(number string, frombase, tobase int) (string, error) + func (kc *LkkConvert) Bin2Dec(str string) (int64, error) + func (kc *LkkConvert) Bin2Hex(str string) (string, error) + func (kc *LkkConvert) Bool2Int(val bool) int + func (kc *LkkConvert) Bool2Str(val bool) string + func (kc *LkkConvert) Byte2Float64(bytes []byte) float64 + func (kc *LkkConvert) Byte2Hex(val []byte) string + func (kc *LkkConvert) Byte2Hexs(val []byte) []byte + func (kc *LkkConvert) Byte2Int64(val []byte) int64 + func (kc *LkkConvert) Bytes2Str(val []byte) string + func (kc *LkkConvert) Dec2Bin(number int64) string + func (kc *LkkConvert) Dec2Hex(number int64) string + func (kc *LkkConvert) Dec2Oct(number int64) string + func (kc *LkkConvert) Float2Str(val interface{}, decimal int) string + func (kc *LkkConvert) Float64ToByte(val float64) []byte + func (kc *LkkConvert) GetPointerAddrInt(variable interface{}) int64 + func (kc *LkkConvert) Gettype(v interface{}) string + func (kc *LkkConvert) Hex2Bin(data string) (string, error) + func (kc *LkkConvert) Hex2Byte(str string) []byte + func (kc *LkkConvert) Hex2Dec(str string) (int64, error) + func (kc *LkkConvert) Hexs2Byte(val []byte) []byte + func (kc *LkkConvert) Int2Str(val interface{}) string + func (kc *LkkConvert) Int64ToByte(val int64) []byte + func (kc *LkkConvert) Ip2Long(ipAddress string) uint32 + func (kc *LkkConvert) IsBinary(s string) bool + func (kc *LkkConvert) IsBool(val interface{}) bool + func (kc *LkkConvert) IsByte(val interface{}) bool + func (kc *LkkConvert) IsEmpty(val interface{}) bool + func (kc *LkkConvert) IsFloat(val interface{}) bool + func (kc *LkkConvert) IsHex(str string) bool + func (kc *LkkConvert) IsInt(val interface{}) bool + func (kc *LkkConvert) IsInterface(val interface{}) bool + func (kc *LkkConvert) IsNil(val interface{}) bool + func (kc *LkkConvert) IsNumeric(val interface{}) bool + func (kc *LkkConvert) IsString(val interface{}) bool + func (kc *LkkConvert) IsStruct(val interface{}) bool + func (kc *LkkConvert) Long2Ip(properAddress uint32) string + func (kc *LkkConvert) Oct2Dec(str string) (int64, error) + func (kc *LkkConvert) Runes2Bytes(rs []rune) []byte + func (kc *LkkConvert) Str2Bool(val string) (res bool) + func (kc *LkkConvert) Str2Bytes(val string) []byte + func (kc *LkkConvert) Str2Float32(val string) float32 + func (kc *LkkConvert) Str2Float64(val string) (res float64) + func (kc *LkkConvert) Str2FloatStrict(val string, bitSize int, strict bool) float64 + func (kc *LkkConvert) Str2Int(val string) (res int) + func (kc *LkkConvert) Str2Int16(val string) int16 + func (kc *LkkConvert) Str2Int32(val string) int32 + func (kc *LkkConvert) Str2Int64(val string) int64 + func (kc *LkkConvert) Str2Int8(val string) int8 + func (kc *LkkConvert) Str2IntStrict(val string, bitSize int, strict bool) int64 + func (kc *LkkConvert) Str2Uint(val string) uint + func (kc *LkkConvert) Str2Uint16(val string) uint16 + func (kc *LkkConvert) Str2Uint32(val string) uint32 + func (kc *LkkConvert) Str2Uint64(val string) uint64 + func (kc *LkkConvert) Str2Uint8(val string) uint8 + func (kc *LkkConvert) Str2UintStrict(val string, bitSize int, strict bool) uint64 + func (kc *LkkConvert) ToBool(val interface{}) bool + func (kc *LkkConvert) ToFloat(val interface{}) (res float64) + func (kc *LkkConvert) ToInt(val interface{}) int + func (kc *LkkConvert) ToStr(val interface{}) string + type LkkDebug byte + func (kd *LkkDebug) CallMethod(t interface{}, method string, args ...interface{}) ([]interface{}, error) + func (kd *LkkDebug) DumpStacks() + func (kd *LkkDebug) GetFuncDir() string + func (kd *LkkDebug) GetFuncFile() string + func (kd *LkkDebug) GetFuncLine() int + func (kd *LkkDebug) GetFuncName(f interface{}, onlyFun ...bool) string + func (kd *LkkDebug) GetFuncPackage(funcFile ...string) string + func (kd *LkkDebug) GetMethod(t interface{}, method string) interface{} + func (kd *LkkDebug) HasMethod(t interface{}, method string) bool + type LkkEncrypt byte + func (ke *LkkEncrypt) AesCBCDecrypt(cipherText, key []byte, paddingType ...LkkPKCSType) ([]byte, error) + func (ke *LkkEncrypt) AesCBCEncrypt(clearText, key []byte, paddingType ...LkkPKCSType) ([]byte, error) + func (ke *LkkEncrypt) AesCFBDecrypt(cipherText, key []byte) ([]byte, error) + func (ke *LkkEncrypt) AesCFBEncrypt(clearText, key []byte) ([]byte, error) + func (ke *LkkEncrypt) AesCTRDecrypt(cipherText, key []byte) ([]byte, error) + func (ke *LkkEncrypt) AesCTREncrypt(clearText, key []byte) ([]byte, error) + func (ke *LkkEncrypt) AesOFBDecrypt(cipherText, key []byte) ([]byte, error) + func (ke *LkkEncrypt) AesOFBEncrypt(clearText, key []byte) ([]byte, error) + func (ke *LkkEncrypt) AuthCode(str, key []byte, encode bool, expiry int64) ([]byte, int64) + func (ke *LkkEncrypt) Base64Decode(str []byte) ([]byte, error) + func (ke *LkkEncrypt) Base64Encode(str []byte) []byte + func (ke *LkkEncrypt) Base64UrlDecode(data []byte) ([]byte, error) + func (ke *LkkEncrypt) Base64UrlEncode(source []byte) []byte + func (ke *LkkEncrypt) EasyDecrypt(val, key []byte) []byte + func (ke *LkkEncrypt) EasyEncrypt(data, key []byte) []byte + func (ke *LkkEncrypt) GenerateRsaKeys(bits int) (private []byte, public []byte, err error) + func (ke *LkkEncrypt) HmacShaX(data, secret []byte, x uint16) []byte + func (ke *LkkEncrypt) PasswordHash(password []byte, costs ...int) ([]byte, error) + func (ke *LkkEncrypt) PasswordVerify(password, hash []byte) bool + func (ke *LkkEncrypt) RsaPrivateDecrypt(cipherText, privateKey []byte) ([]byte, error) + func (ke *LkkEncrypt) RsaPrivateEncrypt(clearText, privateKey []byte) ([]byte, error) + func (ke *LkkEncrypt) RsaPublicDecrypt(cipherText, publicKey []byte) ([]byte, error) + func (ke *LkkEncrypt) RsaPublicEncrypt(clearText, publicKey []byte) ([]byte, error) + type LkkFile byte + func (kf *LkkFile) AbsPath(fpath string) string + func (kf *LkkFile) AppendFile(fpath string, data []byte) error + func (kf *LkkFile) Basename(fpath string) string + func (kf *LkkFile) ChmodBatch(fpath string, filemode, dirmode os.FileMode) (res bool) + func (kf *LkkFile) CopyDir(source string, dest string, cover LkkFileCover) (int64, error) + func (kf *LkkFile) CopyFile(source string, dest string, cover LkkFileCover) (int64, error) + func (kf *LkkFile) CopyLink(source string, dest string) error + func (kf *LkkFile) CountLines(fpath string, buffLength int) (int, error) + func (kf *LkkFile) DelDir(dir string, delRoot bool) error + func (kf *LkkFile) DirSize(fpath string) int64 + func (kf *LkkFile) Dirname(fpath string) string + func (kf *LkkFile) FastCopy(source string, dest string) (int64, error) + func (kf *LkkFile) FileSize(fpath string) int64 + func (kf *LkkFile) FileTree(fpath string, ftype LkkFileTree, recursive bool, filters ...FileFilter) []string + func (kf *LkkFile) FormatDir(fpath string) string + func (kf *LkkFile) FormatPath(fpath string) string + func (kf *LkkFile) GetExt(fpath string) string + func (kf *LkkFile) GetFileMode(fpath string) (os.FileMode, error) + func (kf *LkkFile) GetMime(fpath string, fast bool) string + func (kf *LkkFile) GetModTime(fpath string) (res int64) + func (kf *LkkFile) Glob(pattern string) ([]string, error) + func (kf *LkkFile) Img2Base64(fpath string) (string, error) + func (kf *LkkFile) IsBinary(fpath string) bool + func (kf *LkkFile) IsDir(fpath string) bool + func (kf *LkkFile) IsExecutable(fpath string) bool + func (kf *LkkFile) IsExist(fpath string) bool + func (kf *LkkFile) IsFile(fpath string, ftype ...LkkFileType) (res bool) + func (kf *LkkFile) IsImg(fpath string) bool + func (kf *LkkFile) IsLink(fpath string) bool + func (kf *LkkFile) IsReadable(fpath string) bool + func (kf *LkkFile) IsWritable(fpath string) bool + func (kf *LkkFile) IsZip(fpath string) bool + func (kf *LkkFile) Md5(fpath string, length uint8) (string, error) + func (kf *LkkFile) Mkdir(fpath string, mode os.FileMode) error + func (kf *LkkFile) Pathinfo(fpath string, options int) map[string]string + func (kf *LkkFile) ReadFile(fpath string) ([]byte, error) + func (kf *LkkFile) ReadFirstLine(fpath string) string + func (kf *LkkFile) ReadInArray(fpath string) ([]string, error) + func (kf *LkkFile) ReadLastLine(fpath string) string + func (kf *LkkFile) RealPath(fpath string) string + func (kf *LkkFile) RelativePath(dest, rela string) string + func (kf *LkkFile) Rename(oldname, newname string) error + func (kf *LkkFile) SafeFileName(str string) string + func (kf *LkkFile) ShaX(fpath string, x uint16) (string, error) + func (kf *LkkFile) TarGz(src string, dstTar string, ignorePatterns ...string) (bool, error) + func (kf *LkkFile) Touch(fpath string, size int64) bool + func (kf *LkkFile) UnTarGz(srcTar, dstDir string) (bool, error) + func (kf *LkkFile) UnZip(srcZip, dstDir string) (bool, error) + func (kf *LkkFile) Unlink(fpath string) error + func (kf *LkkFile) WriteFile(fpath string, data []byte, perm ...os.FileMode) error + func (kf *LkkFile) Zip(dst string, fpaths ...string) (bool, error) + type LkkFileCover int8 + type LkkFileTree uint8 + type LkkFileType uint8 + type LkkNumber byte + func (kn *LkkNumber) AbsFloat(number float64) float64 + func (kn *LkkNumber) AbsInt(number int64) int64 + func (kn *LkkNumber) Average(nums ...interface{}) (res float64) + func (kn *LkkNumber) AverageFloat64(nums ...float64) (res float64) + func (kn *LkkNumber) AverageInt(nums ...int) (res float64) + func (kn *LkkNumber) ByteFormat(size float64, decimal uint8, delimiter string) string + func (kn *LkkNumber) Ceil(value float64) float64 + func (kn *LkkNumber) Exp(x float64) float64 + func (kn *LkkNumber) Expm1(x float64) float64 + func (kn *LkkNumber) FloatEqual(f1 float64, f2 float64, decimal ...int) bool + func (kn *LkkNumber) Floor(value float64) float64 + func (kn *LkkNumber) GeoDistance(lng1, lat1, lng2, lat2 float64) float64 + func (kn *LkkNumber) InRange(value interface{}, left interface{}, right interface{}) bool + func (kn *LkkNumber) InRangeFloat32(value, left, right float32) bool + func (kn *LkkNumber) InRangeFloat64(value, left, right float64) bool + func (kn *LkkNumber) InRangeInt(value, left, right int) bool + func (kn *LkkNumber) IsEven(val int) bool + func (kn *LkkNumber) IsNan(val float64) bool + func (kn *LkkNumber) IsNatural(value float64) bool + func (kn *LkkNumber) IsNegative(value float64) bool + func (kn *LkkNumber) IsNonNegative(value float64) bool + func (kn *LkkNumber) IsNonPositive(value float64) bool + func (kn *LkkNumber) IsOdd(val int) bool + func (kn *LkkNumber) IsPositive(value float64) bool + func (kn *LkkNumber) IsWhole(value float64) bool + func (kn *LkkNumber) Max(nums ...interface{}) (res float64) + func (kn *LkkNumber) MaxFloat64(nums ...float64) (res float64) + func (kn *LkkNumber) MaxInt(nums ...int) (res int) + func (kn *LkkNumber) Min(nums ...interface{}) (res float64) + func (kn *LkkNumber) MinFloat64(nums ...float64) (res float64) + func (kn *LkkNumber) MinInt(nums ...int) (res int) + func (kn *LkkNumber) NumSign(value float64) float64 + func (kn *LkkNumber) NumberFormat(number float64, decimal uint8, point, thousand string) string + func (kn *LkkNumber) Percent(val, total interface{}) float64 + func (kn *LkkNumber) Pi() float64 + func (kn *LkkNumber) Pow(x, y float64) float64 + func (kn *LkkNumber) Rand(min, max int) int + func (kn *LkkNumber) RandFloat64(min, max float64) float64 + func (kn *LkkNumber) RandInt(min, max int) int + func (kn *LkkNumber) RandInt64(min, max int64) int64 + func (kn *LkkNumber) Range(min, max int) []int + func (kn *LkkNumber) Round(value float64) float64 + func (kn *LkkNumber) RoundPlus(value float64, precision int8) float64 + func (kn *LkkNumber) Sum(nums ...interface{}) (res float64) + func (kn *LkkNumber) SumFloat64(nums ...float64) float64 + func (kn *LkkNumber) SumInt(nums ...int) int + type LkkOS byte + func (ko *LkkOS) Chdir(dir string) error + func (ko *LkkOS) Chmod(filename string, mode os.FileMode) bool + func (ko *LkkOS) Chown(filename string, uid, gid int) bool + func (ko *LkkOS) ClientIp(req *http.Request) string + func (ko *LkkOS) CpuUsage() (user, idle, total uint64) + func (ko *LkkOS) DiskUsage(path string) (used, free, total uint64) + func (ko *LkkOS) Exec(command string) (retInt int, outStr, errStr []byte) + func (ko *LkkOS) ForceGC() + func (ko *LkkOS) GetBiosInfo() *BiosInfo + func (ko *LkkOS) GetBoardInfo() *BoardInfo + func (ko *LkkOS) GetCpuInfo() *CpuInfo + func (ko *LkkOS) GetEndian() binary.ByteOrder + func (ko *LkkOS) GetHostByIp(ipAddress string) (string, error) + func (ko *LkkOS) GetIPs() (ips []string) + func (ko *LkkOS) GetIpByHostname(hostname string) (string, error) + func (ko *LkkOS) GetIpsByDomain(domain string) ([]string, error) + func (ko *LkkOS) GetMacAddrs() (macAddrs []string) + func (ko *LkkOS) GetPidByPort(port int) (pid int) + func (ko *LkkOS) GetProcessExecPath(pid int) string + func (ko *LkkOS) GetSystemInfo() *SystemInfo + func (ko *LkkOS) GetTempDir() string + func (ko *LkkOS) Getcwd() (string, error) + func (ko *LkkOS) Getenv(varname string, def ...string) string + func (ko *LkkOS) GoMemory() uint64 + func (ko *LkkOS) HomeDir() (string, error) + func (ko *LkkOS) Hostname() (string, error) + func (ko *LkkOS) IsLinux() bool + func (ko *LkkOS) IsLittleEndian() bool + func (ko *LkkOS) IsMac() bool + func (ko *LkkOS) IsPortOpen(host string, port interface{}, protocols ...string) bool + func (ko *LkkOS) IsPrivateIp(address string) (bool, error) + func (ko *LkkOS) IsProcessExists(pid int) (res bool) + func (ko *LkkOS) IsPublicIP(ip net.IP) bool + func (ko *LkkOS) IsWindows() bool + func (ko *LkkOS) LocalIP() (string, error) + func (ko *LkkOS) MemoryUsage(virtual bool) (used, free, total uint64) + func (ko *LkkOS) OutboundIP() (string, error) + func (ko *LkkOS) PrivateCIDR() []*net.IPNet + func (ko *LkkOS) Pwd() string + func (ko *LkkOS) Setenv(varname, data string) error + func (ko *LkkOS) System(command string) (retInt int, outStr, errStr []byte) + func (ko *LkkOS) TriggerGC() + type LkkPKCSType int8 + type LkkPadType uint8 + type LkkRandString uint8 + type LkkString byte + func (ks *LkkString) Addslashes(str string) string + func (ks *LkkString) AtWho(text string, minLen ...int) []string + func (ks *LkkString) Big5ToUtf8(s []byte) ([]byte, error) + func (ks *LkkString) Br2nl(str string) string + func (ks *LkkString) Chr(chr int) string + func (ks *LkkString) ChunkSplit(str string, chunklen uint, end string) string + func (ks *LkkString) ClearUrlPrefix(str string, prefix ...string) string + func (ks *LkkString) ClearUrlSuffix(str string, suffix ...string) string + func (ks *LkkString) ClosestWord(word string, searchs []string) (string, int) + func (ks *LkkString) CountBase64Byte(str string) (res int) + func (ks *LkkString) CountWords(str string) (int, map[string]int) + func (ks *LkkString) Crc32(str string) uint32 + func (ks *LkkString) DBC2SBC(s string) string + func (ks *LkkString) Dstrpos(str string, arr []string, chkCase bool) (bool, string) + func (ks *LkkString) EndsWith(str, sub string, ignoreCase bool) bool + func (ks *LkkString) Explode(str string, delimiters ...string) (res []string) + func (ks *LkkString) FirstLetter(str string) string + func (ks *LkkString) FormatUrl(str string) string + func (ks *LkkString) GbkToUtf8(s []byte) ([]byte, error) + func (ks *LkkString) GetDomain(str string, isMains ...bool) string + func (ks *LkkString) Gravatar(email string, size uint16) string + func (ks *LkkString) HasChinese(str string) bool + func (ks *LkkString) HasEnglish(str string) bool + func (ks *LkkString) HasFullWidth(str string) bool + func (ks *LkkString) HasHalfWidth(str string) bool + func (ks *LkkString) HasLetter(str string) bool + func (ks *LkkString) HasSpecialChar(str string) (res bool) + func (ks *LkkString) HasWhitespace(str string) bool + func (ks *LkkString) HideCard(card string) string + func (ks *LkkString) HideMobile(mobile string) string + func (ks *LkkString) HideTrueName(name string) string + func (ks *LkkString) Html2Text(str string) string + func (ks *LkkString) Htmlentities(str string) string + func (ks *LkkString) HtmlentityDecode(str string) string + func (ks *LkkString) HttpBuildQuery(queryData url.Values) string + func (ks *LkkString) Img2Base64(content []byte, ext ...string) string + func (ks *LkkString) Index(str, sub string, ignoreCase bool) int + func (ks *LkkString) IsASCII(str string) bool + func (ks *LkkString) IsAlphaNumeric(str string) bool + func (ks *LkkString) IsBase64(str string) bool + func (ks *LkkString) IsBase64Image(str string) bool + func (ks *LkkString) IsBlank(str string) bool + func (ks *LkkString) IsChinese(str string) bool + func (ks *LkkString) IsChineseName(str string) bool + func (ks *LkkString) IsCreditNo(str string) (bool, string) + func (ks *LkkString) IsDNSName(str string) bool + func (ks *LkkString) IsDialString(str string) bool + func (ks *LkkString) IsEmail(email string, validateHost bool) (bool, error) + func (ks *LkkString) IsEmpty(str string) bool + func (ks *LkkString) IsEnglish(str string, letterCase LkkCaseSwitch) bool + func (ks *LkkString) IsHexcolor(str string) (bool, string) + func (ks *LkkString) IsHost(str string) bool + func (ks *LkkString) IsIP(str string) bool + func (ks *LkkString) IsIPv4(str string) bool + func (ks *LkkString) IsIPv6(str string) bool + func (ks *LkkString) IsJSON(str string) bool + func (ks *LkkString) IsLetters(str string) bool + func (ks *LkkString) IsLower(str string) bool + func (ks *LkkString) IsMACAddr(str string) bool + func (ks *LkkString) IsMd5(str string) bool + func (ks *LkkString) IsMobilecn(str string) bool + func (ks *LkkString) IsMultibyte(str string) bool + func (ks *LkkString) IsPhone(str string) bool + func (ks *LkkString) IsPort(val interface{}) bool + func (ks *LkkString) IsRGBcolor(str string) bool + func (ks *LkkString) IsRsaPublicKey(str string, keylen int) bool + func (ks *LkkString) IsSha1(str string) bool + func (ks *LkkString) IsSha256(str string) bool + func (ks *LkkString) IsSha512(str string) bool + func (ks *LkkString) IsTel(str string) bool + func (ks *LkkString) IsUpper(str string) bool + func (ks *LkkString) IsUrl(str string) bool + func (ks *LkkString) IsUrlExists(str string) bool + func (ks *LkkString) IsUtf8(str string) bool + func (ks *LkkString) IsWhitespaces(str string) bool + func (ks *LkkString) IsWord(str string) bool + func (ks *LkkString) JsonDecode(data []byte, val interface{}) error + func (ks *LkkString) JsonEncode(val interface{}) ([]byte, error) + func (ks *LkkString) Jsonp2Json(str string) (string, error) + func (ks *LkkString) LastIndex(str, sub string, ignoreCase bool) int + func (ks *LkkString) Lcfirst(str string) string + func (ks *LkkString) Lcwords(str string) string + func (ks *LkkString) Levenshtein(a, b *string) int + func (ks *LkkString) Ltrim(str string, characterMask ...string) string + func (ks *LkkString) MbStrlen(str string) int + func (ks *LkkString) MbSubstr(str string, start int, length ...int) string + func (ks *LkkString) Md5(str string, length uint8) string + func (ks *LkkString) Md5Byte(str []byte, length uint8) []byte + func (ks *LkkString) Nl2br(html string) string + func (ks *LkkString) Ord(char string) rune + func (ks *LkkString) ParseStr(encodedString string, result map[string]interface{}) error + func (ks *LkkString) ParseUrl(str string, component int) (map[string]string, error) + func (ks *LkkString) Quotemeta(str string) string + func (ks *LkkString) Random(length uint8, rtype LkkRandString) string + func (ks *LkkString) RawurlDecode(str string) (string, error) + func (ks *LkkString) RawurlEncode(str string) string + func (ks *LkkString) RemoveAfter(str, after string, include, ignoreCase bool) string + func (ks *LkkString) RemoveBefore(str, before string, include, ignoreCase bool) string + func (ks *LkkString) RemoveEmoji(str string) string + func (ks *LkkString) RemoveSpace(str string, all bool) string + func (ks *LkkString) Reverse(str string) string + func (ks *LkkString) Rtrim(str string, characterMask ...string) string + func (ks *LkkString) SBC2DBC(s string) string + func (ks *LkkString) Serialize(val interface{}) ([]byte, error) + func (ks *LkkString) ShaX(str string, x uint16) string + func (ks *LkkString) ShaXByte(str []byte, x uint16) []byte + func (ks *LkkString) Shuffle(str string) string + func (ks *LkkString) SimilarText(first, second string, percent *float64) int + func (ks *LkkString) StartsWith(str, sub string, ignoreCase bool) bool + func (ks *LkkString) StripTags(str string) string + func (ks *LkkString) Stripos(haystack, needle string, offset int) int + func (ks *LkkString) Stripslashes(str string) string + func (ks *LkkString) Strlen(str string) int + func (ks *LkkString) Strpad(str string, fill string, max int, ptype LkkPadType) string + func (ks *LkkString) StrpadBoth(str string, fill string, max int) string + func (ks *LkkString) StrpadLeft(str string, fill string, max int) string + func (ks *LkkString) StrpadRight(str string, fill string, max int) string + func (ks *LkkString) Strpos(haystack, needle string, offset int) int + func (ks *LkkString) Strripos(haystack, needle string, offset int) int + func (ks *LkkString) Strrpos(haystack, needle string, offset int) int + func (ks *LkkString) Substr(str string, start int, length ...int) string + func (ks *LkkString) SubstrCount(str, substr string) int + func (ks *LkkString) ToCamelCase(str string) string + func (ks *LkkString) ToKebabCase(str string) string + func (ks *LkkString) ToSnakeCase(str string) string + func (ks *LkkString) Trim(str string, characterMask ...string) string + func (ks *LkkString) TrimBOM(str []byte) []byte + func (ks *LkkString) Ucfirst(str string) string + func (ks *LkkString) Ucwords(str string) string + func (ks *LkkString) UnSerialize(data []byte, registers ...interface{}) (val interface{}, err error) + func (ks *LkkString) Uniqid(prefix string) string + func (ks *LkkString) UrlDecode(str string) (string, error) + func (ks *LkkString) UrlEncode(str string) string + func (ks *LkkString) Utf8ToBig5(s []byte) ([]byte, error) + func (ks *LkkString) Utf8ToGbk(s []byte) ([]byte, error) + func (ks *LkkString) UuidV4() (string, error) + func (ks *LkkString) VersionCompare(version1, version2, operator string) bool + type LkkTime byte + func (kt *LkkTime) CheckDate(year, month, day int) bool + func (kt *LkkTime) Date(format string, ts ...interface{}) string + func (kt *LkkTime) Day(t ...time.Time) int + func (kt *LkkTime) DaysBetween(fromDate, toDate time.Time) int + func (kt *LkkTime) EndOfDay(date time.Time) time.Time + func (kt *LkkTime) EndOfMonth(date time.Time) time.Time + func (kt *LkkTime) EndOfWeek(date time.Time, weekStartDay ...time.Weekday) time.Time + func (kt *LkkTime) EndOfYear(date time.Time) time.Time + func (kt *LkkTime) GetMonthDays(month int, years ...int) (days int) + func (kt *LkkTime) Hour(t ...time.Time) int + func (kt *LkkTime) IsDate2time(str string) (bool, int64) + func (kt *LkkTime) MicroTime() int64 + func (kt *LkkTime) MilliTime() int64 + func (kt *LkkTime) Minute(t ...time.Time) int + func (kt *LkkTime) Month(t ...time.Time) int + func (kt *LkkTime) Second(t ...time.Time) int + func (kt *LkkTime) ServiceStartime() int64 + func (kt *LkkTime) ServiceUptime() time.Duration + func (kt *LkkTime) Sleep(t int64) + func (kt *LkkTime) StartOfDay(date time.Time) time.Time + func (kt *LkkTime) StartOfMonth(date time.Time) time.Time + func (kt *LkkTime) StartOfWeek(date time.Time, weekStartDay ...time.Weekday) time.Time + func (kt *LkkTime) StartOfYear(date time.Time) time.Time + func (kt *LkkTime) Str2Timestamp(str string, format ...string) (int64, error) + func (kt *LkkTime) Str2Timestruct(str string, format ...string) (time.Time, error) + func (kt *LkkTime) UnixTime() int64 + func (kt *LkkTime) Usleep(t int64) + func (kt *LkkTime) Year(t ...time.Time) int + type SystemInfo struct + AllocGolang uint64 + AllocTotal uint64 + CpuFree float64 + CpuNum int + CpuUser float64 + DiskFree uint64 + DiskTotal uint64 + DiskUsed uint64 + Frees uint64 + GoroutineNum int + LastGCTime uint64 + Lookups uint64 + Mallocs uint64 + MemFree uint64 + MemSys uint64 + MemTotal uint64 + MemUsed uint64 + NextGC uint64 + PauseNs uint64 + PauseTotalNs uint64 + Runtime int64 + ServerName string + SystemOs string