Go Doc Comments
Canonical rules for package, type, function, and field documentation comments in Go.
Canonical rules for package, type, function, and field documentation comments in Go.
- Author: Go Team
- Authority: primary
- Kind: guide
- URL: https://go.dev/doc/comment
What it covers
- package comments
- identifier doc comments
- documentation formatting and conventions
Why authoritative
Official Go documentation standard for API comments.
Use when
- how should this Go doc comment be written
- is this package comment idiomatic
- what does the Go doc comment guide require
Keywords
- doc comments, godoc, package docs, API docs, comments