Go Code Review Comments(Go代码审查注解)
This page collects common comments made during reviews of Go code, so that a single detailed explanation can be referred to by shorthands. This is a laundry list of common mistakes, not a style guide.
本页收集在Go代码审查过程中发表的常见评论,以便可以通过简短的说明来提及一个详细的解释。 这是一个常见错误的清单,而不是风格指南。
You can view this as a supplement to(你可以查看此补充说明)
Please discuss changes before editing this page, even minor ones. Many people have opinions and this is not the place for edit wars.
在编辑本页面之前,请讨论更改,甚至是次要更改。很多人都有自己的观点,而这不是编辑斗争的地方。
- Gofmt
- Comment Sentences
- Contexts
- Copying
- Crypto Rand
- Declaring Empty Slices
- Doc Comments
- Don't Panic
- Error Strings
- Examples
- Goroutine Lifetimes
- Handle Errors
- Imports
- Import Dot
- In-Band Errors
- Indent Error Flow
- Initialisms
- Interfaces
- Line Length
- Mixed Caps
- Named Result Parameters
- Naked Returns
- Package Comments
- Package Names
- Pass Values
- Receiver Names
- Receiver Type
- Synchronous Functions
- Useful Test Failures
- Variable Names
网友评论