Documentation
¶
Overview ¶
Package codoc provides functionality for storing and retrieving code documentation. It defines data structures for representing code elements like packages, functions, and structs, and provides an API for registering and retrieving documentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Field ¶
type Field struct {
Name string // Field name
Doc string // Field documentation string
Comment string // Inline comment for the field
}
Field represents a field in a struct with its documentation.
type Function ¶
type Function struct {
Name string // Function name
Doc string // Function documentation string
Args []string // List of argument names
Results []string // List of result names
}
Function represents a Go function with its documentation. It includes the function's name, documentation, and parameter information.
func GetFunction ¶
GetFunction retrieves a function from the registry by its ID. The ID can be either a direct function ID or a struct method ID (pkg.struct.method). Returns nil if the function is not found.
type Package ¶
type Package struct {
ID string // Unique identifier for the package
Name string // Package name
Doc string // Package documentation string
Functions map[string]Function // Map of functions in the package
Structs map[string]Struct // Map of structs in the package
}
Package represents a Go package with its documentation. It contains information about the package itself, as well as maps of the functions and structs defined within it.
func GetPackage ¶
GetPackage retrieves a package from the registry by its ID. Returns nil if the package is not found.
type Struct ¶
type Struct struct {
Name string // Struct name
Doc string // Struct documentation string
Fields map[string]Field // Map of fields in the struct
Methods map[string]Function // Map of methods associated with the struct
}
Struct represents a Go struct with its documentation. It includes the struct's name, documentation, fields, and methods.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
codoc
command
Package main provides a command-line tool for generating code documentation.
|
Package main provides a command-line tool for generating code documentation. |
|
Package codocgen provides tools for generating code documentation from Go source code.
|
Package codocgen provides tools for generating code documentation from Go source code. |