你好!我们很高兴你想为这个项目做出贡献。 你的帮助对保持它的完美是至关重要的。
-
函数名严格按照 PHP下划线 => Go大驼峰命名
- array() => Array()
- array_change_key_case() => ArrayChangeKeyCase()
-
缩进统一使用Tab
-
每次提交一个函数,注释以函数名开头
-
新增函数文件以PHP函数名命名单独提交,方便后期函数排序整理
-
不要提交二进制文件(本地测试可以使用go run命令)
示例:
// FuncName - Description of function do
func FuncName(args Type) Type {
return args
}
-
Fork
https://github.com/awesee/php2go
并克隆到本地. -
创建新的分支:
$ git checkout -b my-new-feature
-
编写提交代码。
$ git commit -am 'Add some feature'
-
Push 到你的分支。
$ git push origin my-new-feature
-
创建 Pull Request 并描述你完成的功能或者做出的修改。