with one click
lang-go
// Use when writing, auditing, or generating documentation for Go projects — covers docstring conventions, API doc extraction, and Go-specific patterns.
// Use when writing, auditing, or generating documentation for Go projects — covers docstring conventions, API doc extraction, and Go-specific patterns.
Use when generating or auditing documentation in Docusaurus format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in MkDocs format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in plain Markdown format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in Sphinx format — covers config, directory structure, frontmatter conventions, and build commands.
Use when generating or auditing documentation in VitePress format — covers config, directory structure, frontmatter conventions, and build commands.
Use when writing, auditing, or generating documentation for projects in unsupported languages — covers docstring conventions, API doc extraction, and generic heuristic patterns.
| name | lang-go |
| description | Use when writing, auditing, or generating documentation for Go projects — covers docstring conventions, API doc extraction, and Go-specific patterns. |
Go uses capitalization as the visibility mechanism. A symbol is public (exported) if:
| Pattern | Public? |
|---|---|
func ProcessData( | Yes (uppercase P) |
func processData( | No (lowercase p) |
type Config struct | Yes |
type config struct | No |
var MaxRetries = | Yes |
const DefaultTimeout = | Yes |
| Type | Detection | Documentation Expected |
|---|---|---|
| Functions | func Name( at package level | Godoc comment starting with function name |
| Methods | func (r *Receiver) Name( | Godoc comment starting with method name |
| Types | type Name struct/interface | Godoc comment starting with type name |
| Constants | const Name = (exported) | Godoc comment or inline comment |
| Variables | var Name = (exported) | Godoc comment |
| Package | package name | Package comment in doc.go or any file |
Go documentation comments must:
// ProcessData reads input from r and returns processed results.
// It returns an error if the input is malformed.
func ProcessData(r io.Reader) ([]Result, error) {
// Package auth provides user authentication and session management.
//
// It supports OAuth2, JWT, and API key authentication methods.
package auth
Prefer doc.go for package-level documentation.
A Go symbol is fully documented when:
internal/ packages: exclude from public API coverage (they are internal)_test.go files: exclude (test code)generated files (containing // Code generated): excludeSource files: **/*.go
Exclude: vendor/, *_test.go, files with // Code generated header