Skip to content

Commit c051255

Browse files
authored
Merge pull request #13 from lvan100/main
add CODE_OF_CONDUCT.md and CONTRIBUTING.md
2 parents 4469bf8 + 80faf84 commit c051255

File tree

7 files changed

+334
-63
lines changed

7 files changed

+334
-63
lines changed

.gitignore

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
1-
.DS_Store
1+
# If you prefer the allow list template instead of the deny list, see community template:
2+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3+
#
4+
# Binaries for programs and plugins
5+
*.exe
6+
*.exe~
7+
*.dll
8+
*.so
9+
*.dylib
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool, specifically when used with LiteIDE
15+
*.out
16+
17+
# Dependency directories (remove the comment below to include it)
218
vendor/
19+
20+
# Go workspace file
21+
go.work
22+
go.work.sum
23+
24+
# env file
25+
.env
26+
27+
# OS generated files
28+
.DS_Store
29+
30+
# IDE files
331
.idea/
432

533
/conf/remote/app-online.properties

CODE_OF_CONDUCT.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# 贡献者行为准则
2+
3+
首先,感谢你关注并支持 Go-Spring 项目!
4+
5+
为营造一个开放、友善、包容和专业的社区氛围,我们制定了本行为准则。无论你是报告问题、提交代码、参与讨论,还是以其他形式参与项目,都请遵循以下准则。
6+
7+
## 我们的承诺
8+
9+
我们承诺为每一位参与者提供一个免受骚扰、歧视和攻击性行为干扰的环境。我们欢迎来自不同背景、经验和身份的贡献者,共同建设一个多元、包容的社区。
10+
11+
## 倡导的行为
12+
13+
- 保持尊重、礼貌的沟通方式;
14+
- 乐于接受建设性的意见与反馈;
15+
- 尊重不同的观点与技术选择;
16+
- 在协作中体现耐心与包容;
17+
- 积极参与,共建积极向上的社区氛围。
18+
19+
## 不被接受的行为
20+
21+
- 使用歧视性、侮辱性或攻击性的言语与行为;
22+
- 进行人身攻击、骚扰或威胁;
23+
- 发布淫秽内容或不当链接;
24+
- 蓄意干扰他人正常贡献;
25+
- 冒充他人或侵犯他人隐私。
26+
27+
## 执行与维护
28+
29+
项目维护者有权也有责任删除、修改或拒绝任何违反行为准则的评论、提交、代码、Wiki 编辑、Issue 或其他形式的贡献内容,必要时可采取进一步措施。
30+
31+
## 如何报告问题
32+
33+
若你遇到违反行为准则的情况,请通过电子邮件联系项目维护者,或通过 Issue 匿名举报。我们承诺认真对待每一份举报,并确保信息保密。
34+
35+
---
36+
37+
# Contributor Code of Conduct
38+
39+
Thank you for your interest in and support of the Go-Spring project!
40+
41+
To cultivate an open, respectful, inclusive, and professional community, we ask that all participants follow this Code
42+
of Conduct in every interaction—whether reporting issues, submitting code, engaging in discussions, or contributing in
43+
any other way.
44+
45+
## Our Commitment
46+
47+
We are committed to providing a harassment-free experience for everyone, regardless of age, background, identity, or
48+
experience level. We value and support diversity and inclusivity within our community.
49+
50+
## Encouraged Behavior
51+
52+
- Communicate with respect and courtesy.
53+
- Welcome and consider constructive feedback.
54+
- Appreciate diverse perspectives and technical choices.
55+
- Demonstrate patience and empathy in collaborations.
56+
- Contribute positively to a welcoming and supportive environment.
57+
58+
## Unacceptable Behavior
59+
60+
- Use of discriminatory, abusive, or offensive language or conduct.
61+
- Harassment, threats, or personal attacks.
62+
- Sharing explicit content or inappropriate links.
63+
- Deliberate disruption of constructive efforts.
64+
- Impersonation or violation of personal privacy.
65+
66+
## Enforcement
67+
68+
Project maintainers are responsible for upholding this Code of Conduct. They have the authority to remove, edit, or
69+
reject comments, commits, code, wiki edits, issues, or other contributions that violate these guidelines, and to take
70+
further action as necessary.
71+
72+
## Reporting Violations
73+
74+
If you witness or experience a violation of this Code of Conduct, please contact the maintainers via email or submit an
75+
anonymous issue. All reports will be handled with discretion and taken seriously.

CONTRIBUTING.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Contributing to Go-Spring
2+
3+
首先,感谢你关注并支持 Go-Spring 项目!
4+
5+
我们欢迎各种形式的贡献,包括但不限于 Issue 提交、文档完善、Bug 修复、功能开发等。请按照以下指引参与贡献:
6+
7+
## 提交 Issue
8+
9+
- 在提交前,请先搜索现有的 Issue,避免重复提交。
10+
- 请提供清晰的复现步骤、预期行为以及实际结果。
11+
- 如有错误日志或运行环境信息,请一并附上。
12+
13+
## 提交 Pull Request
14+
15+
1. **Fork 仓库并创建新分支**
16+
```bash
17+
git checkout -b feature/your-feature-name
18+
```
19+
20+
2. **保持一致的代码风格**
21+
- 遵循 Go 官方代码规范(使用 `gofmt``golint``go vet`
22+
- 推荐使用 [`golangci-lint`](https://github.com/golangci/golangci-lint) 进行本地代码检查
23+
24+
3. **编写测试用例**
25+
- 所有新功能必须配备单元测试
26+
- 使用 Go 内置的 `testing` 包,测试文件应命名为 `xxx_test.go`
27+
28+
4. **更新相关文档(如有变更)**
29+
30+
5. **提交并创建 Pull Request**
31+
- 说明 PR 的目的、变更内容、测试情况等
32+
- 关联相关 Issue(如有)
33+
34+
## 本地开发环境要求
35+
36+
- Go 版本:推荐使用最新版稳定版(如 `go1.21+`
37+
- 使用 Go Modules 进行依赖管理
38+
- 确保测试全部通过:
39+
```bash
40+
go test ./...
41+
```
42+
43+
## 联系我们
44+
45+
如有疑问,欢迎通过 Issue 与我们联系,或参与项目的讨论区。
46+
47+
感谢你的贡献!
48+
49+
---
50+
51+
# Contributing to Go-Spring
52+
53+
First of all, thank you for your interest in and support of the Go-Spring project!
54+
55+
We welcome all kinds of contributions, including reporting issues, improving documentation, fixing bugs, and developing
56+
new features. Please follow the guidelines below to contribute:
57+
58+
## Submitting Issues
59+
60+
- Before submitting, please search existing issues to avoid duplicates.
61+
- Provide clear reproduction steps, expected behavior, and actual results.
62+
- If available, include error logs and relevant environment information.
63+
64+
## Submitting Pull Requests
65+
66+
1. **Fork the repository and create a new branch**
67+
```bash
68+
git checkout -b feature/your-feature-name
69+
```
70+
71+
2. **Maintain consistent coding style**
72+
- Follow Go’s official style guidelines (use `gofmt`, `golint`, `go vet`)
73+
- It’s recommended to use [`golangci-lint`](https://github.com/golangci/golangci-lint) for local linting
74+
75+
3. **Write tests**
76+
- All new features must include unit tests
77+
- Use Go’s built-in `testing` package, and name test files as `xxx_test.go`
78+
79+
4. **Update documentation (if applicable)**
80+
81+
5. **Submit and create a Pull Request**
82+
- Clearly describe the purpose, changes made, and testing results
83+
- Link relevant issues (if any)
84+
85+
## Local Development Environment
86+
87+
- Go version: Latest stable release is recommended (e.g., `go1.21+`)
88+
- Use Go Modules for dependency management
89+
- Make sure all tests pass:
90+
```bash
91+
go test ./...
92+
```
93+
94+
## Contact Us
95+
96+
If you have any questions, feel free to open an issue or join the discussion forum.
97+
98+
Thank you for contributing!

conf/storage/store.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,23 @@
1414
* limitations under the License.
1515
*/
1616

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

1936
import (

0 commit comments

Comments
 (0)