I used to think that I didn’t need comments if I wrote self-documenting code. However, I have realized that I do write comments, and that I find them really useful. To see how many comments I write, and what kind … Continue reading →
#comments
3 posts
15 Jun 2021
29 Mar 2014
This post is a follow up to Friday’s post on comments in Go. Keith Rarick and Nate Finch pointed out that I had neglected to include two important practical use cases. Build tags I’ve previously written about how to use // +build tags to perform conditional compilation. In light of the previous post it’s probably […]
28 Mar 2014
This is a quick post to discuss the rules of comments in Go. To quickly recap, Go comments come in two forms // everything from the double slash to the end of line is a comment /* everything from the opening slash star, to the closing one is a comment */ As the first form […]