feat(github_releases): support dir size for show all version #7938
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
配置项
*.md
和LICENSE
文件本次修改内容
1. 修改 JSON 解析,支持统计目录大小
之前偷懒使用了
jsoniter.Get
动态访问 JSON 字段。我写统计所有版本的总文件大小时,发现耗时过久。只统计 latest 总大小时耗时不明显,所以没注意到。(T_T)
改用
json.Unmarshal
解析到静态字段,再统计总大小,似乎能提升速度。因此,本次 pr 也支持了显示所有版本时,统计目录大小。
2. 修复 显示所有版本时,
LICENSE
和.md
的位置不恰当之前,开启
显示所有版本
和显示 README
后:现在修改后:
3. 修改默认的 RepoStructure
修改为
alist-org/alist
4. 增加 gh-proxy 支持
填入
https://ghproxy.net/github.com
会将原下载链接 https://github.com/AlistGo/alist/releases/download/v3.42.0/alist-linux-amd64.tar.gz
替换为 https://ghproxy.net/github.com/AlistGo/alist/releases/download/v3.42.0/alist-linux-amd64.tar.gz
测试
本 pr 无兼容问题,以下写法均已自测。
测试镜像:docker.io/yangrucheng/alist:pr-7938