diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 29f95657..c3deaec3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,55 +1,5 @@ # Contributing to Go-Spring -首先,感谢你关注并支持 Go-Spring 项目! - -我们欢迎各种形式的贡献,包括但不限于 Issue 提交、文档完善、Bug 修复、功能开发等。请按照以下指引参与贡献: - -## 提交 Issue - -- 在提交前,请先搜索现有的 Issue,避免重复提交。 -- 请提供清晰的复现步骤、预期行为以及实际结果。 -- 如有错误日志或运行环境信息,请一并附上。 - -## 提交 Pull Request - -1. **Fork 仓库并创建新分支** - ```bash - git checkout -b feature/your-feature-name - ``` - -2. **保持一致的代码风格** - - 遵循 Go 官方代码规范(使用 `gofmt`、`golint`、`go vet`) - - 推荐使用 [`golangci-lint`](https://github.com/golangci/golangci-lint) 进行本地代码检查 - -3. **编写测试用例** - - 所有新功能必须配备单元测试 - - 使用 Go 内置的 `testing` 包,测试文件应命名为 `xxx_test.go` - -4. **更新相关文档(如有变更)** - -5. **提交并创建 Pull Request** - - 说明 PR 的目的、变更内容、测试情况等 - - 关联相关 Issue(如有) - -## 本地开发环境要求 - -- Go 版本:推荐使用最新版稳定版(如 `go1.21+`) -- 使用 Go Modules 进行依赖管理 -- 确保测试全部通过: - ```bash - go test ./... - ``` - -## 联系我们 - -如有疑问,欢迎通过 Issue 与我们联系,或参与项目的讨论区。 - -感谢你的贡献! - ---- - -# Contributing to Go-Spring - First of all, thank you for your interest in and support of the Go-Spring project! We welcome all kinds of contributions, including reporting issues, improving documentation, fixing bugs, and developing @@ -96,3 +46,53 @@ new features. Please follow the guidelines below to contribute: If you have any questions, feel free to open an issue or join the discussion forum. Thank you for contributing! + +--- + +# Contributing to Go-Spring + +首先,感谢你关注并支持 Go-Spring 项目! + +我们欢迎各种形式的贡献,包括但不限于 Issue 提交、文档完善、Bug 修复、功能开发等。请按照以下指引参与贡献: + +## 提交 Issue + +- 在提交前,请先搜索现有的 Issue,避免重复提交。 +- 请提供清晰的复现步骤、预期行为以及实际结果。 +- 如有错误日志或运行环境信息,请一并附上。 + +## 提交 Pull Request + +1. **Fork 仓库并创建新分支** + ```bash + git checkout -b feature/your-feature-name + ``` + +2. **保持一致的代码风格** + - 遵循 Go 官方代码规范(使用 `gofmt`、`golint`、`go vet`) + - 推荐使用 [`golangci-lint`](https://github.com/golangci/golangci-lint) 进行本地代码检查 + +3. **编写测试用例** + - 所有新功能必须配备单元测试 + - 使用 Go 内置的 `testing` 包,测试文件应命名为 `xxx_test.go` + +4. **更新相关文档(如有变更)** + +5. **提交并创建 Pull Request** + - 说明 PR 的目的、变更内容、测试情况等 + - 关联相关 Issue(如有) + +## 本地开发环境要求 + +- Go 版本:推荐使用最新版稳定版(如 `go1.21+`) +- 使用 Go Modules 进行依赖管理 +- 确保测试全部通过: + ```bash + go test ./... + ``` + +## 联系我们 + +如有疑问,欢迎通过 Issue 与我们联系,或参与项目的讨论区。 + +感谢你的贡献! diff --git a/README.md b/README.md index 548ea99e..4f66667a 100644 --- a/README.md +++ b/README.md @@ -614,3 +614,27 @@ s := gstest.Wire(t, new(struct { })) assert.That(t, s.SvrAddr).Equal("0.0.0.0:9090") ``` + +## 📚 Comparison with Other Frameworks + +Go-Spring differentiates itself with these key features: + +| Feature | Go-Spring | Wire | fx | dig | +|--------------------------|-----------|------|----|-----| +| Runtime IoC Container | ✓ | ✗ | ✓ | ✓ | +| Compile-time Validation | Partial | ✓ | ✗ | ✗ | +| Conditional Beans | ✓ | ✗ | ✗ | ✗ | +| Dynamic Configuration | ✓ | ✗ | ✗ | ✗ | +| Lifecycle Management | ✓ | ✗ | ✓ | ✗ | +| Property Binding | ✓ | ✗ | ✗ | ✗ | +| Zero-struct Modification | ✓ | ✓ | ✗ | ✓ | + +## 🏢 Who's using Go-Spring? + +- ... + +> Using Go-Spring and want to be featured here? Welcome to submit a PR! + +## 🤝 Contributing + +We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) to get started. \ No newline at end of file diff --git a/README_CN.md b/README_CN.md index 27cf1e8a..3747a7e6 100644 --- a/README_CN.md +++ b/README_CN.md @@ -576,3 +576,27 @@ s := gstest.Wire(t, new(struct { })) assert.That(t, s.SvrAddr).Equal("0.0.0.0:9090") ``` + +## 📚 与其他框架的对比 + +Go-Spring 具备以下几个显著优势: + +| 功能点 | Go-Spring | Wire | fx | dig | +|------------------|-----------|------|----|-----| +| 运行时 IoC 容器 | ✓ | ✗ | ✓ | ✓ | +| 编译期校验 | 部分支持 | ✓ | ✗ | ✗ | +| 条件 Bean 支持 | ✓ | ✗ | ✗ | ✗ | +| 动态配置能力 | ✓ | ✗ | ✗ | ✗ | +| 生命周期管理 | ✓ | ✗ | ✓ | ✗ | +| 属性绑定 | ✓ | ✗ | ✗ | ✗ | +| 零结构体侵入(无需修改原结构体) | ✓ | ✓ | ✗ | ✓ | + +## 🏢 谁在使用 Go-Spring? + +- ... + +> 在使用 Go-Spring 并希望展示在此处?欢迎提交 PR! + +## 🤝 参与贡献 + +我们欢迎所有形式的贡献!请查阅 [CONTRIBUTING.md](CONTRIBUTING.md) 获取参与方式。 diff --git a/gs/gs.go b/gs/gs.go index 05f96e38..8b1997fd 100644 --- a/gs/gs.go +++ b/gs/gs.go @@ -34,7 +34,7 @@ import ( ) const ( - Version = "go-spring@v1.2.0.rc2" + Version = "go-spring@v1.2.0" Website = "https://go-spring.com/" )