package
1.1.7
Repository: https://github.com/jjapplication/apollo.git
Documentation: pkg.go.dev

# Functions

ArchiveFile 打包文件 默认为tar.gz fileName 要打包的文件 dst 要生成的文件名 autoClear 自动清空文件 写时复制 会导致writeToolong 将当前文件备份到tmp后压缩并删除.
Backup 检查是否存在备份文件.
No description provided by the author
CalcFileSize 统计byte kb mb gb.
CalcPathDepth 计算路径深度 offsetDir 初始目录需要减去这个长度 eg: offset: /code/gen dir: /code/gen/map depth = 4 - 3 = 1.
CalDir calculate dirs.
CheckAsync 通过检查是否异步执行.
ClearFile 清空文件.
No description provided by the author
No description provided by the author
No description provided by the author
CMDWithContext 执行结束后会杀死父进程来关闭shell.
CreateFile 多级目录和文件的创建.
CreateFileX 可执行文件创建 需要额外的x权限.
CreateOrCoverFile 覆盖文件或者创建文件.
No description provided by the author
No description provided by the author
No description provided by the author
GetAppDir get application dir.
GetFileSize 获取文件大小 不存在时为0.
GetFileTreeAllDepth 递归返回路径树 为避免卡顿最大遍历深度为5.
No description provided by the author
ParseJson 通过byte读取.
ParseJsonFile 解析文件.
No description provided by the author
No description provided by the author
RemoveFile 尽力删除 文件不存在 不报错.
Rotate 日志绕接 计算大小阈值 超过才会压缩 否则跳过.
Save2Json 输出配置到byte.
Save2JsonFile 保存为json文件.
No description provided by the author
TimeCalcString 计算时间差的string.
TimeCalcUnix 计算ms差.
TimeNowBetterSep 形如"2006-1-2-15-04-05".
TimeNowFormat 返回符合格式的时间戳.
TimeNowString 计算当前日志的年月日时分秒.
TimeNowUnix 计算当前unix时间.
TimeNowYearDay 计算当前日期的年月日.
TimeToLocal 时区转换 转换为当地时区 ->东8区.

# Constants

No description provided by the author
命令行运行 会开启新的sid 不会和主进程共用终端.
No description provided by the author
No description provided by the author
MaxDepth 可以通过环境变量ApolloMaxDepth自定义.
No description provided by the author
No description provided by the author
No description provided by the author
20mb.
命令行运行 会开启新的sid 不会和主进程共用终端.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
拼接ServiceRoot.
No description provided by the author
No description provided by the author

# Structs

No description provided by the author