go build,go test,go tool pprof ,go tool cover。建議了解 -race 參數(shù)的使用
推薦工具
gofmt/goimport/goreturn
推薦等級:必須使用 ,應調(diào)整為 save 后自動 format。
調(diào)整代碼格式。goimport 會自動 import go package,在大倉庫下速度比較慢,不建議使用。
golint /gometalint
推薦等級:必須使用
go-plus 默認使用 gometalint 。gometalint 自動包含了常見的 lint 如 govet,golint 等。
使用時建議仔細閱讀 lint message,了解 lint 相關的詳細解釋。盡量保證提交代碼無 error 和 warnning。
以下 lint error/warnning 可暫時忽略:
變量名中使用 Id
public 方法或結構沒有注釋
其中 1 屬于歷史遺留問題 2 推薦補充但暫時可忽略
代碼規(guī)范
參照 go 項目本身的代碼規(guī)范,猶豫的地方可參考 go 的標準庫
必讀文章,建議至少看 3 遍以上。
https://golang.org/doc/effective_go.html
https://github.com/golang/go/wiki/CodeReviewComments
http://www.runoob.com/go/go-tutorial.html
補充
如非必要,不要將函數(shù),類型或常量聲明為公有。
注釋建議使用簡單的英文。
注釋應該針對是 why 而非 how 和 what。
測試:
git status # 這一步不是必須的,但良好習慣應該確認下被更改的文件是自己所修改的
git diff # 這一步不是必須的,用于查看詳細的代碼修改
git add <modified_file1> <modified_file2> <modified_dir3> ...
git commit -m "IssueId:**** The message for this commit, which explains why you modify the related code"
git status # 確認一下所有的更改都commit了
git log # 這一步不是必須的,用于查看歷史的commit記錄
plugin
https://plugins.jetbrains.com/plugin/5047-go-language-golang-org-support-plugin
https://github.com/go-lang-plugin-org/go-lang-idea-plugin/wiki/v1.0.0-Setup-initial-project
go
go-project 練習
https://github.com/avelino/awesome-go#data-structures
go github 資源
http://www.itdecent.cn/p/f814504c8f05
https://github.com/sjwhitworth/golearn
go example
其他 gan
微軟劍橋研究院關于GAN介紹 p153
http://www.nowozin.net/sebastian/talks/mlss2018/MLSS%202018%20-%20Nowozin%20-%20GANs%20introduction.pdf
Deepmind 關于GAN介紹
http://www.gatsby.ucl.ac.uk/~balaji/Understanding-GANs.pdf
Goodfellow CVPR上關于GAN介紹
http://www.iangoodfellow.com/slides/2018-06-18.pdf