Versions in this module Expand all Collapse all v0 v0.3.1 Oct 23, 2023 v0.3.0 Oct 23, 2023 Changes in this version + func Base64StdEncodingDecode(input string) ([]byte, error) + func Base64StdEncodingEncodeToString(input []byte) string + func BetweenStr(str, start, end string) string + func CheckPingBaseURL(baseURL string) (retBool bool) + func ClearUrl(text string) string + func CreateUUID() (string, error) + func CrosscheckKey(key string, maxKey int) (retBool bool) + func CrosscheckKeyWithBase(keyBase, key string, maxKey int) (retBool bool) + func EncryptHmacSha256(data string, secret string) string + func EncryptHmacmd5(src, key string) (cryptext string) + func EncryptMd5(source string) (cryptext string) + func EncryptMd5Byte(source []byte) (cryptext string) + func EncryptSha1(plaintext string) (cryptext string) + func FileExist(path string) bool + func GB18030String(str string) string + func Gb18030ToUtf8(s []byte) ([]byte, error) + func Gb18030ToUtf8String(s string) string + func GetAbsPath(tmpName, defaultName string) string + func GetBetweenStr(str, start, end string) string + func GetRedirectUrl(str string, isClear bool) (string, error) + func GetRedirectUrlEx(str string, isClear bool) (retText string, err error) + func GetRedirectUrlJD(str string, isClear bool) (retText string, err error) + func GetRedirectUrlWithTCN(str string, isClear bool) (retText string, err error) + func GetRel(basepath, targpath string) string + func GetSafeHtml(text string) (string, error) + func GetTextCleaner(textStr string) (retText, retHash string) + func GetUrlToByte(url string) (retByte []byte, err error) + func GetUrlToByteEx(url string, timeOut time.Duration) (retByte []byte, err error) + func GetUrlToString(url string) (retText string, err error) + func GetUrlToStringEx(url string, timeOut time.Duration) (retText string, err error) + func GetUrlWithCookieToString(url, cookie, host, referer, userAgent string) (retText string, err error) + func GetUrlWithCookieToStringAndSaveFile(url, cookie, host, referer, userAgent, filePath string) (retText string, err error) + func Getwd() string + func Gzip(data []byte) + func IsExist(f string) bool + func IsExists(path string) (bool, error) + func IsFile(f string) bool + func IsFileExist(path string) (bool, error) + func JsonDecode(data string, inter interface{}) error + func JsonDecodeByte(bytes []byte) map[string]interface + func JsonDecodeString(String string) map[string]interface + func JsonEncode(data interface{}) string + func JsonEncodeMapToByte(stringMap map[string]interface{}) []byte + func KeyworldListParse(keyworldListStr string) []string + func KeyworldListParseToArrMap(keyworldText string) []map[string]string + func KeyworldListParseToMap(keyworldText string) map[string]string + func LeftStr(str, posStr string, isContainsPosStr bool) string + func MD5Hash(text string) string + func Marshal(obj interface{}) string + func MarshalEx(obj interface{}, isEscapeHTML bool) string + func MkDir(path string) error + func MsgSignatureCheck(msgmsgSignature string, maxKey int) (retBool bool) + func MsgSignatureCheckEx(msgmsgSignature, msgText string, maxKey int) (retBool bool) + func MsgTextCleanerCheck(msgText string, maxKey int) (retBool bool) + func MsgTextToHtml(msg string) (retText string, err error) + func OpenURL(url string) error + func PostToServer(serverApiUrl, serverToken string, postData interface{}) (ret []byte, err error) + func PostToServerEx(serverApiUrl, serverToken string, postData interface{}) (ret string, err error) + func RandTimeMinute(n int64) time.Duration + func RandTimeSecond(n int64) time.Duration + func ReadFile(path string) (retByte []byte, err error) + func RemoveFile(filePath string) error + func RemoveRep(slc []string) []string + func RemoveRepByLoop(slc []string) []string + func RemoveRepByMap(slc []string) []string + func RightStr(str, posStr string, isContainsPosStr bool) string + func RuneIndex(p []byte, n int) (int, bool) + func RuneIndexInString(s string, n int) (int, bool) + func RuneSub(p []byte, start, length int) []byte + func RuneSubString(s string, start, length int) string + func SleepRandTimeMinute(n int64) + func SleepRandTimeSecond(n int64) + func StructToMap(data interface{}) map[string]interface + func SubStrDecodeRuneInString(s string, length int) string + func SubStrRange(s string, length int) string + func SubStrRuneN(textStr string, n int) (retText string) + func TbkPidParse(pid string) (siteID, adzoneID string) + func TimeStampNow() int64 + func TimeStampNowEx(isSecond bool) int64 + func TinyURLAPI(langURL, apiBaseURL string, timeDuration time.Duration, isJson bool) (retText string, err error) + func TrimEmoji(s string) string + func TrimHtml(src string) string + func UnGzip(byte []byte) []byte + func UnicodeEmojiCode(s string) string + func UnicodeEmojiDecode(s string) string + func UrlMapToTGHTML(urlMap map[string]string) (ret string, err error) + func UrlPatchHttp(url string) (ret string) + func UrlRegMatchReplace(str string) (ret string) + func UrlRegMatchReplaceToMarkdown(str string) (ret string) + func UrlRegMatchReplaceToTGHTML(str string) (ret string, err error) + func UrlTextToMap(urlText string) (ret map[string]string, err error) + func Utf8ToGb18030(s []byte) ([]byte, error) + func Utf8ToGb18030String(s string) string + func VerifyEmailFormat(email string) bool + func VerifyMobileFormat(mobileNum string) bool + func VerifyNameFormat(name string) bool + func WriteFile(filePath string, fileBody []byte) error + type BCounter struct + var Counter *BCounter + func (c *BCounter) Get() int64 + func (c *BCounter) Inc() + func (c *BCounter) IsNice() bool + func (c *BCounter) IsNiceWithNum(num int64) bool