Go TutorialLesson 5Free preview
Go Comments
This lesson is part of Go · All levels
Summary
This lesson explains how to write comments on Go. One-line commentary is written with two slashes // and multi-line commentary is wrapped /*... */, similar to the C family of languages. Comments are also used for documentation of packages and functions that can be read by godoc tools.
Key points
- One line commentary written with //
- Multi-line comments are wrapped up.
- The comments above the declaration serve as a documentation of the godoc
- Comments are not executed and ignored by the compiler
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.