You should use standard // comments because this is what the official documentation tool called godoc will use to generate documentation for your go code. You can have a look at this post from the official golang blog about it: http://blog.golang.org/godoc-documenting-go-code
I also found this quite interesting: https://godoc.org/github.com/natefinch/godocgo
Answer from Jery on Stack OverflowYou should use standard // comments because this is what the official documentation tool called godoc will use to generate documentation for your go code. You can have a look at this post from the official golang blog about it: http://blog.golang.org/godoc-documenting-go-code
I also found this quite interesting: https://godoc.org/github.com/natefinch/godocgo
You should use standard // and the first word must be the name of function package (for generator) .
golang doc :
Notice this comment is a complete sentence that begins with the name of the element it describes. This important convention allows us to generate documentation