package
0.1.10
Repository: https://github.com/kbrownehs18/gotools.git
Documentation: pkg.go.dev

# Functions

AbsolutePath get execute binary path.
Authcode Discuz Authcode golang version params[0] encrypt/decrypt bool true:encrypt false:decrypt, default: false params[1] key params[2] expires time(second) params[3] dynamic key length.
Base64Decode string decode.
Base64Encode string encode.
Contains item is in map/slice/array.
CopyFile cp command.
DateFormat format time.Time .
Exists whether file or directory exists.
GetLocalIP get local network ip.
HMacSHA256 hmac sha256.
HTTPRequest request url request url method request method post or get args[0] type is map[string]string or string, request paramaters, \x00@ if upload file args[1] type is map[string]string, request headers args[2] type is bool, whether to return the result args[3] type is *http.Client, custom client.
IP2Long IP convert to long int.
IsDir return bool.
IsEmpty true: nil, "", false, 0, 0.0, {}, [].
IsFile return tool.
IsIP ip address is valid.
IsMac mac address is valid.
IsMobile check chinese mobile number.
Keys key of map.
Long2IP longint convert to IP.
Md5Sum md5.
NewRand return *rand.Rand.
Now format now.
RandArray rand string slice.
RandRangeInt return min<=x<max.
RandRangeInt32 return min<=x<max.
RangeArray generate array.
Reverse string reverse.
RsaDecode rsa decode.
RSADecode rsa decode.
RsaEncode rsa encode.
RSAEncode rsa.
SHA256 return string.
Split split by match.
SplitBySpaceTab splite by space or tab.
StrToLocalTime get time.Time from string.
StrToTime get time.Time from string.
StructToMap struct convert to map.
TimeFormat format time.Time.
Trim remove "", \r, \t, \n.
URLDecode urldecode.
URLEncode urlencode.
UUID uuid.
Values value of map.

# Constants

DECODE decode str.
ENCODE encode str.
GET http request get method.
PKCS1 CertType.
PKCS8 CertType.
POST
POST post http request.

# Variables

MaxDecryptBlock rsa decode max length.
MaxEncryptBlock rsa encode max length.

# Type aliases

AuthCodeType auth code type.
CertType Certificate type.
Method http request method.