Skip to the content.

← 返回首页

Contributing

感谢你对本项目的关注!欢迎通过 Issue 和 Pull Request 参与贡献。

开发流程

  1. Fork 本仓库
  2. 创建特性分支:git checkout -b feature/your-feature
  3. 提交更改:git commit -m "feat: add your feature"
  4. 推送分支:git push origin feature/your-feature
  5. 创建 Pull Request

开发环境

前置要求

启动开发服务

go mod tidy
go run ./cmd/server
# 浏览器访问 http://localhost:8080

测试与质量检查

提交前请确保以下检查全部通过:

# 构建
go build ./...

# 单元测试(Linux/macOS 支持 -race)
go test -race -count=1 ./...

# 静态分析
go vet ./...

# Lint(需安装 golangci-lint)
golangci-lint run

CI 会自动运行 golangci-lint、多版本 Go 测试和 staticcheck。

代码规范

提交信息格式

推荐使用 Conventional Commits