39 Star 292 Fork 81

GVPdubbogo / dubbo-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CONTRIBUTING.md 2.12 KB
一键复制 编辑 原始数据 按行查看 历史

Contributing to Dubbogo

1. Branch

  • The name of branches SHOULD be in the format of feature/xxx.
  • You SHOULD checkout a new branch after a feature branch already being merged into upstream, DO NOT commit in the old branch.

2. Pull Request

2.1. Title Format

The pr head format is <head> <subject>. The title should be simpler to show your intent.

The title format of the pull request MUST follow the following rules:

  • Start with Doc: for adding/formatting/improving docs.
  • Start with Mod: for formatting codes or adding comment.
  • Start with Fix: for fixing bug, and its ending should be #issue-id if being relevant to some issue.
  • Start with Imp: for improving performance.
  • Start with Ftr: for adding a new feature.
  • Start with Add: for adding struct function/member.
  • Start with Rft: for refactoring codes.
  • Start with Tst: for adding tests.
  • Start with Dep: for adding depending libs.
  • Start with Rem: for removing feature/struct/function/member/files.

3. Code Style

Please add a blank line at the end of every file.

Please add a blank line at the sub-title and its content.

Please add s space between the Engilsh word/digit number and the Chinese character.

3.1 log

  • 1 when logging the function's input parameter, you should add '@' before input parameter name.

3.2 naming

  • 1 do not use an underscore in package name, such as filter_impl.
  • 2 do not use an underscore in constants, such as DUBBO_PROTOCOL. use 'DubboProtocol' instead.

3.3 comment

  • 1 there should be comment for every export func/var.
  • 2 the comment should begin with function name/var name.

3.4 import

We dubbogo import blocks should be splited into 3 blocks.

// block 1: the go internal package
import (
  "fmt"
)

// block 2: the third package
import (
  "github.com/dubbogo/xxx"

  "github.com/RoaringBitmap/roaring"
)

// block 3: the dubbo-go package
import (
  "dubbo.apache.org/dubbo-go/v3/common"
)

3.5 package

There should be a blank line between the license and the package name.

The package name should not have "xxx_impl".

Go
1
https://gitee.com/dubbogo/dubbo-go.git
git@gitee.com:dubbogo/dubbo-go.git
dubbogo
dubbo-go
dubbo-go
master

搜索帮助