From 8d718985bf19a4ddd7bbc644fcacdc70fc815d2f Mon Sep 17 00:00:00 2001 From: kingecg Date: Sat, 13 Sep 2025 20:47:14 +0800 Subject: [PATCH] fix mod --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ go.mod | 2 +- 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md create mode 100644 README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..37d864d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# 贡献指南 + +欢迎为 GoPacker 项目贡献代码!以下是贡献流程和规范。 + +## 开发流程 + +1. Fork 本项目到你的 GitHub 账户。 +2. 克隆你的 Fork 到本地: + ```bash + git clone https://github.com/your-username/gopacker.git + ``` +3. 创建新分支: + ```bash + git checkout -b feature/your-feature + ``` +4. 提交代码变更并推送到你的 Fork: + ```bash + git push origin feature/your-feature + ``` +5. 提交 Pull Request 到主仓库的 `main` 分支。 + +## 代码风格 + +- 遵循 Go 官方代码风格(使用 `gofmt` 格式化代码)。 +- 提交信息需清晰描述变更内容。 +- 确保代码通过测试(如果有)。 + +## 构建与测试 + +- 使用 `make build` 构建项目。 +- 运行 `make clean` 清理构建产物。 + +## 问题反馈 + +请在 GitHub Issues 中报告问题或提出建议。 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c206d9 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# GoPacker + +一个用于将可执行的 boot 程序和资源文件打包成单个文件的命令行工具。 + +## 功能 + +- 将 boot 程序和多个资源文件打包成一个文件。 +- 支持单个文件和文件夹作为资源输入。 +- 记录资源文件的相对路径和偏移量。 +- 在输出文件末尾附加资源文件的元数据(JSON 格式)。 + +## 安装 + +1. 克隆仓库: + ```bash + git clone https://github.com/kingecg/code/gopacker.git + ``` +2. 构建工具: + ```bash + make build + ``` + 构建完成后,可执行文件位于 `./bin/packer`。 + +## 使用方法 + +```bash +./bin/packer -b /path/to/boot -f /path/to/resource1 -f /path/to/resource2 -o /path/to/output +``` + +### 参数说明 + +- `-b`:指定 boot 程序路径(必需)。 +- `-f`:指定资源文件或文件夹路径(可多次使用)。 +- `-o`:指定输出文件路径(必需)。 + +## 示例 + +```bash +./bin/packer -b ./boot.bin -f ./resources -f ./config.json -o ./output.bin +``` + +## 许可证 + +MIT \ No newline at end of file diff --git a/go.mod b/go.mod index 73ff0d0..ce08a96 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module git.kingecg.top/kingecg/gopacker -go 1.23.1 +go 1.23