Skip to content

add CODE_OF_CONDUCT.md and CONTRIBUTING.md #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2025
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
30 changes: 29 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
.DS_Store
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/

# Go workspace file
go.work
go.work.sum

# env file
.env

# OS generated files
.DS_Store

# IDE files
.idea/

/conf/remote/app-online.properties
Expand Down
75 changes: 75 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# 贡献者行为准则

首先,感谢你关注并支持 Go-Spring 项目!

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

## 我们的承诺

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

## 倡导的行为

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

## 不被接受的行为

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

## 执行与维护

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

## 如何报告问题

若你遇到违反行为准则的情况,请通过电子邮件联系项目维护者,或通过 Issue 匿名举报。我们承诺认真对待每一份举报,并确保信息保密。

---

# Contributor Code of Conduct

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.

## Our Commitment

We are committed to providing a harassment-free experience for everyone, regardless of age, background, identity, or
experience level. We value and support diversity and inclusivity within our community.

## 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.

## 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.

## Enforcement

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

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.
98 changes: 98 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# 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
new features. Please follow the guidelines below to contribute:

## Submitting Issues

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

## 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

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)**

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

## 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:
```bash
go test ./...
```

## Contact Us

If you have any questions, feel free to open an issue or join the discussion forum.

Thank you for contributing!
17 changes: 17 additions & 0 deletions conf/storage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@
* limitations under the License.
*/

// Package storage provides structured configuration storage, and `ConfigPath` represents
// the hierarchical path of a configuration item.
//
// Each configuration item must have a well-defined type. The key of a configuration item
// (its `path`) can be split into components that form a tree structure, where each node
// corresponds to a part of the configuration hierarchy.
//
// The `path` serves both as the unique identifier (key) of the configuration item and
// as its location within the configuration tree. This design mirrors the structure of
// typical configuration file formats such as JSON, YAML, and TOML.
//
// A `path` is composed of only two types of elements:
// - Key: Represents a map key in the configuration tree.
// - Index: Represents an array index in the configuration tree.
//
// This approach ensures consistency, type safety, and compatibility with structured
// configuration formats.
package storage

import (
Expand Down
Loading
Loading