Using Go Code Review Comments to Communicate With Your Colleagues

May 26, 2023
David Sunnyside

If you are reviewing Go code, there are several ways to have a conversation about the changes. Often, these conversations are best if they happen face to face, where tone of voice and even facial expressions convey a lot more information than typing back and forth. However, if that isn’t possible, code review comments can be very helpful.

Using code review comments is a great way to communicate with your colleagues about changes you are reviewing. They are a fast and easy way to share ideas, ask questions, and provide feedback about a change. They can also be used to highlight important issues and clarify the purpose of a change.

In addition to standard Go comments, there are specific review comment types you can use. These are intended to address common problems encountered when reviewing Go code. They are not intended as a complete list of style rules; they are meant to complement Effective Go, which is a comprehensive style guide.

In general, if you are reviewing someone else’s code, be polite and courteous in your comments. It is difficult to convey the same nuance of tone that you would in person over a chat client or email, and it is easy to misunderstand each other. Try to keep your comments as short and concise as possible.

To avoid confusion, use a consistent naming convention for comment headers and text. In most cases, these conventions follow the naming conventions for the file you are reviewing. This makes it easier to identify files, reviews, and line comments in the Diff pane.

David Sunnyside
Co-founder of Urban Splatter • Digital Marketer • Engineer • Meditator
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram