Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 105 additions & 31 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
Thank you for your interest in and support of the Go-Spring project!

To cultivate an open, respectful, inclusive, and professional community, we ask that all participants follow this Code
of Conduct in every interaction—whether reporting issues, submitting code, engaging in discussions, or contributing in
any other way.
of Conduct in every interaction—whether reporting issues, submitting code, engaging in discussions, or participating in
any official project activity.

## Scope

This Code of Conduct applies to all interactions related to the Go-Spring project, including but not limited to:

* Issues and pull requests on the repository
* Discussions in forums, chat channels, or mailing lists
* Contributions to documentation, wiki, or website
* Participation in online or offline project events

## Our Commitment

Expand All @@ -13,30 +22,58 @@ experience level. We value and support diversity and inclusivity within our comm

## Encouraged Behavior

- Communicate with respect and courtesy.
- Welcome and consider constructive feedback.
- Appreciate diverse perspectives and technical choices.
- Demonstrate patience and empathy in collaborations.
- Contribute positively to a welcoming and supportive environment.
* Communicate with respect and courtesy
* Welcome and consider constructive feedback
* Appreciate diverse perspectives and technical choices
* Demonstrate patience and empathy in collaborations
* Contribute positively to a welcoming and supportive environment

**Examples of encouraged behavior:**

* Providing constructive code reviews
* Welcoming newcomers with guidance
* Sharing knowledge in a respectful manner

## Unacceptable Behavior

- Use of discriminatory, abusive, or offensive language or conduct.
- Harassment, threats, or personal attacks.
- Sharing explicit content or inappropriate links.
- Deliberate disruption of constructive efforts.
- Impersonation or violation of personal privacy.
* Use of discriminatory, abusive, or offensive language or conduct
* Harassment, threats, or personal attacks
* Sharing explicit content or inappropriate links
* Deliberate disruption of constructive efforts
* Impersonation or violation of personal privacy

**Examples of unacceptable behavior:**

* Using slurs or offensive language
* Harassing contributors for opinions or technical choices
* Posting inappropriate content or links

## Enforcement
## Reporting Violations

If you witness or experience a violation of this Code of Conduct, please report it to the project maintainers via email
or by submitting an anonymous issue.

When reporting a violation, please provide:

* Description of the incident
* Links to relevant content or screenshots
* Names of involved participants (if known)

Maintainers will respond within 48 hours and handle all reports confidentially.

## Enforcement and Consequences

Project maintainers are responsible for upholding this Code of Conduct. They have the authority to remove, edit, or
reject comments, commits, code, wiki edits, issues, or other contributions that violate these guidelines, and to take
further action as necessary.

## Reporting Violations
Possible consequences for violations include:

If you witness or experience a violation of this Code of Conduct, please contact the maintainers via email or submit an
anonymous issue. All reports will be handled with discretion and taken seriously.
* Removal of contributions or comments
* Temporary or permanent suspension of project access
* Reporting to relevant platform authorities

Appeals can be submitted via email to the maintainers.

---

Expand All @@ -46,30 +83,67 @@ anonymous issue. All reports will be handled with discretion and taken seriously

为营造一个开放、友善、包容和专业的社区氛围,我们制定了本行为准则。无论你是报告问题、提交代码、参与讨论,还是以其他形式参与项目,都请遵循以下准则。

## 适用范围

本行为准则适用于与 Go-Spring 项目相关的所有活动,包括但不限于:

* 仓库中的 Issue 和 Pull Request
* 论坛、聊天群或邮件列表中的讨论
* 文档、Wiki 或网站的贡献
* 线上或线下的官方项目活动

## 我们的承诺

我们承诺为每一位参与者提供一个免受骚扰、歧视和攻击性行为干扰的环境。我们欢迎来自不同背景、经验和身份的贡献者,共同建设一个多元、包容的社区。
我们承诺为每一位参与者提供一个免受骚扰干扰的环境,无论年龄、背景、身份或经验水平。我们欢迎来自不同背景的贡献者,共同建设一个多元、包容的社区。

## 倡导的行为

- 保持尊重、礼貌的沟通方式;
- 乐于接受建设性的意见与反馈;
- 尊重不同的观点与技术选择;
- 在协作中体现耐心与包容;
- 积极参与,共建积极向上的社区氛围。
* 保持尊重、礼貌的沟通方式
* 乐于接受建设性的意见与反馈
* 尊重不同的观点与技术选择
* 在协作中体现耐心与包容
* 积极参与,共建积极向上的社区氛围

**正面行为示例:**

* 提供建设性的代码审查
* 欢迎新人并提供指导
* 尊重他人分享知识

## 不被接受的行为

- 使用歧视性、侮辱性或攻击性的言语与行为;
- 进行人身攻击、骚扰或威胁;
- 发布淫秽内容或不当链接;
- 蓄意干扰他人正常贡献;
- 冒充他人或侵犯他人隐私。
* 使用歧视性、侮辱性或攻击性的言语与行为
* 人身攻击、骚扰或威胁他人
* 发布淫秽内容或不当链接
* 蓄意干扰他人正常贡献
* 冒充他人或侵犯他人隐私

**违规行为示例:**

* 使用侮辱性词语或攻击性语言
* 因观点或技术选择骚扰贡献者
* 发布不当内容或链接

## 举报违规行为

若你遇到或目击违反本行为准则的情况,请通过电子邮件联系项目维护者,或通过 Issue 匿名举报。

提交举报时,请尽量提供以下信息:

* 事件描述
* 相关内容链接或截图
* 相关人员姓名(如已知)

维护者将在 48 小时内回复,并确保信息保密。

## 执行与后果

## 执行与维护
项目维护者有权也有责任删除、修改或拒绝任何违反行为准则的评论、提交、代码、Wiki 编辑、Issue 或其他形式的贡献内容,并在必要时采取进一步措施。

项目维护者有权也有责任删除、修改或拒绝任何违反行为准则的评论、提交、代码、Wiki 编辑、Issue 或其他形式的贡献内容,必要时可采取进一步措施。
违规可能导致的后果包括:

## 如何报告问题
* 删除贡献内容或评论
* 暂停或永久禁用项目访问权限
* 向相关平台报告

若你遇到违反行为准则的情况,请通过电子邮件联系项目维护者,或通过 Issue 匿名举报。我们承诺认真对待每一份举报,并确保信息保密
如对处理结果有异议,可通过电子邮件向维护者提交申诉
160 changes: 125 additions & 35 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,188 @@
# Contributing to Go-Spring

First of all, thank you for your interest in and support of the Go-Spring project!
First of all, thank you for your interest in and support of the Go-Spring project!
Before contributing, please read our [Contributor Code of Conduct](CODE_OF_CONDUCT.md).

We welcome all kinds of contributions, including reporting issues, improving documentation, fixing bugs, and developing
new features. Please follow the guidelines below to contribute:
new features. Please follow the guidelines below to contribute.

## Table of Contents

- [Submitting Issues](#submitting-issues)
- [Submitting Pull Requests](#submitting-pull-requests)
- [Branch Naming Guidelines](#branch-naming-guidelines)
- [Local Development Environment](#local-development-environment)
- [Testing](#testing)
- [Contact Us](#contact-us)

## Submitting Issues

- Before submitting, please search existing issues to avoid duplicates.
- Search existing issues before submitting to avoid duplicates.
- Provide clear reproduction steps, expected behavior, and actual results.
- If available, include error logs and relevant environment information.
- Include error logs and environment information if applicable.

## Submitting Pull Requests

1. **Fork the repository and create a new branch**

```bash
git checkout -b feature/your-feature-name
```
````

2. **Maintain consistent coding style**
- Follow Go’s official style guidelines (use `gofmt`, `golint`, `go vet`)
- It’s recommended to use [`golangci-lint`](https://github.com/golangci/golangci-lint) for local linting

* Follow Go’s official style guidelines (`gofmt`, `golint`, `go vet`).
* Recommended: [`golangci-lint`](https://github.com/golangci/golangci-lint) for local linting.

3. **Write tests**
- All new features must include unit tests
- Use Go’s built-in `testing` package, and name test files as `xxx_test.go`

4. **Update documentation (if applicable)**
* All new features or bug fixes must include unit tests.
* Use Go’s `testing` package; test files should be named `xxx_test.go`.
* Example:

```go
func TestAdd(t *testing.T) {
result := Add(1, 2)
if result != 3 {
t.Errorf("expected 3, got %d", result)
}
}
```

4. **Update documentation**

* If your changes affect usage or APIs, update README or code comments.

5. **Submit and create a Pull Request**
- Clearly describe the purpose, changes made, and testing results
- Link relevant issues (if any)

* Clearly describe:

* **What**: What changes are made
* **Why**: Why the changes are needed
* **How**: How it was implemented
* **Testing**: How it was tested
* Link related issues if applicable.

## Branch Naming Guidelines

* `feature/xxx` – New feature
* `fix/xxx` – Bug fix
* `doc/xxx` – Documentation updates
* `refactor/xxx` – Code refactoring

## Local Development Environment

- Go version: Latest stable release is recommended (e.g., `go1.21+`)
- Use Go Modules for dependency management
- Make sure all tests pass:
* Recommended Go version: latest stable release (e.g., `go1.21+`)
* Use Go Modules for dependency management.
* Make sure all tests pass before submitting:

```bash
go test ./...
```

## Testing

* Run `go test ./...` to ensure all tests pass.
* For examples or integration tests, provide instructions if needed.

## Contact Us

If you have any questions, feel free to open an issue or join the discussion forum.
* Open an issue on GitHub for questions or feedback.
* Join project discussions via the community forum or chat.

Thank you for contributing!
Thank you for contributing to Go-Spring!

---
---

# Contributing to Go-Spring
# 贡献 Go-Spring 的指南

首先,感谢你关注并支持 Go-Spring 项目!
在贡献之前,请先阅读我们的 [贡献者行为准则](CODE_OF_CONDUCT.md)。

我们欢迎各种形式的贡献,包括提交 Issue、完善文档、修复 Bug、开发新功能等。请按照以下指引参与贡献。

我们欢迎各种形式的贡献,包括但不限于 Issue 提交、文档完善、Bug 修复、功能开发等。请按照以下指引参与贡献:
## 目录

* [提交 Issue](#提交-issue)
* [提交 Pull Request](#提交-pull-request)
* [分支命名规范](#分支命名规范)
* [本地开发环境要求](#本地开发环境要求)
* [测试](#测试)
* [联系我们](#联系我们)

## 提交 Issue

- 在提交前,请先搜索现有的 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) 进行本地代码检查

* 遵循 Go 官方代码规范(使用 `gofmt`、`golint`、`go vet`)。
* 推荐使用 [`golangci-lint`](https://github.com/golangci/golangci-lint) 进行本地检查。

3. **编写测试用例**
- 所有新功能必须配备单元测试
- 使用 Go 内置的 `testing` 包,测试文件应命名为 `xxx_test.go`

4. **更新相关文档(如有变更)**
* 所有新功能或 Bug 修复必须配备单元测试。
* 使用 Go 内置 `testing` 包,测试文件命名为 `xxx_test.go`。
* 示例:

```go
func TestAdd(t *testing.T) {
result := Add(1, 2)
if result != 3 {
t.Errorf("expected 3, got %d", result)
}
}
```

4. **更新文档**

* 如果变更影响使用或接口,请同步更新 README 或代码注释。

5. **提交并创建 Pull Request**
- 说明 PR 的目的、变更内容、测试情况等
- 关联相关 Issue(如有)

* 清晰说明:

* **What**:本次修改的内容
* **Why**:修改原因
* **How**:实现方式
* **Testing**:测试情况
* 关联相关 Issue(如有)。

## 分支命名规范

* `feature/xxx` – 新功能
* `fix/xxx` – Bug 修复
* `doc/xxx` – 文档更新
* `refactor/xxx` – 代码重构

## 本地开发环境要求

- Go 版本:推荐使用最新版稳定版(如 `go1.21+`)
- 使用 Go Modules 进行依赖管理
- 确保测试全部通过:
* Go 版本:推荐使用最新版稳定版(如 `go1.21+`)
* 使用 Go Modules 管理依赖
* 提交前确保所有测试通过:

```bash
go test ./...
```

## 测试

* 运行 `go test ./...` 确保所有测试通过
* 对于示例或集成测试,请提供使用说明(如适用)

## 联系我们

如有疑问,欢迎通过 Issue 与我们联系,或参与项目的讨论区。
* 可通过 GitHub Issue 提问或反馈
* 参与项目讨论区交流

感谢你的贡献
感谢你为 Go-Spring 做出的贡献
Loading