# README
This is a library project that integrates some common functions
# Functions
noinspection GoUnusedExportedFunction.
No description provided by the author
noinspection GoUnusedExportedFunction.
CheckTrace trace = 0 记录使用这个函数的位置,trace = 1 记录上一级调用位置 noinspection GoUnusedExportedFunction.
ClearLog 清空指定日志数据库中的所有记录.
CRC16 函数返回源数据的 16 位校验码.
CRC16Append 直接把 2 字节的校验码添加到源数据末尾.
CRC16Bytes 函数返回字节形式的 16 位校验码.
CRC16Check 校验CRC16,末尾2字节必须包含校验码.
CreateFolder 生成路径指定的文件夹,包括所有上级文件夹 noinspection GoUnusedExportedFunction.
DeleteFolder 删除文件夹和它的内容, path 也可以是一个文件 noinspection GoUnusedExportedFunction.
DeleteLog 删除默认的日志记录,idStart 到 idStop 的log都会被删除,包含这两个 id,要删除一个id 设置 idStart = id = idStop.
noinspection GoUnusedExportedFunction.
No description provided by the author
noinspection GoUnusedExportedFunction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
noinspection GoUnusedExportedFunction.
No description provided by the author
No description provided by the author
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
No description provided by the author
noinspection GoUnusedExportedFunction.
No description provided by the author
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
OutputColor 这个函数输出效果和logColor相同,但是只输出到控制台,任何时候都不会保存到数据库 skip: 0 是OutputColor的调用位置, 1 是上一级函数的调用位置.
noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
No description provided by the author
SaveFile 函数保存数据到指定文件,要求目标目录必须存在,否则失败。目标文件如果已经存在,会被新数据覆盖.
SaveFileAndFolder 函数会自动创建目标文件所在的目录文件夹,如果目标文件已经存在,数据会被覆盖, 此函数和 SaveFileToFolder 的区别是无需分开传输目录和文件参数 noinspection GoUnusedExportedFunction.
SaveFileExistFail 防止同名文件被覆盖,只有目标文件不存在才会成功.
SaveFileToFolder 函数会自动创建目标文件所在的目录文件夹,如果目标文件已经存在,数据会被覆盖 noinspection GoUnusedExportedFunction.
SaveFileToFolderExistFail 保存到文件,并且生成所有上级文件夹(如果不存在),但是如果文件存在,函数失败, 用于防止已经存在的文件被覆盖 noinspection GoUnusedExportedFunction.
noinspection GoUnusedExportedFunction.
SetLogDb 设置 Log 保存到数据库的方式
dbType string: 数据库类型, 目前支持 sqlite 和 mysql 两个值
db *DB: 数据库, 支持 MySql 和 SQLite3, 如果这个值是 nil, 则相当于取消日志系统绑定的数据库
save bool: 是否保存到数据库, 即使设置了日志系统绑定的数据库, 仍然可以设置不保存到数据库, 只打印到输出窗口 noinspection GoUnusedExportedFunction.
SetLogLimit 设置日志表的最多条数, 防止日志无限增长, 但是旧的日志会被覆盖.
No description provided by the author
UGEncode 和 Utf8ToGbk 功能相同,转换 utf8 为 gbk,但是这函数会逐字符转换, 成功调用 success 回调,失败调用 failed 回调。.
Utf8ToGbk 函数转换 Utf8 编码的字串(golang 字串内存编码)为 GBK 编码数据, 如果源字串 s 包含无法用 GBK 编码表示的字符,则函数会失败,此时返回的数据为一个长度为 0 的字节数组,但是不是 nil。.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
SQLiteMemDb SQLite 内存数据库, 它的函数并不支持并发, 但并不是说不能多线程调用, 而是不能频繁调用 普通的确认没有线程竞争的情况下是可以多线程调用的.
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author