package godoc

Import Path
	golang.org/x/pkgsite/internal/godoc (on go.dev)

Dependency Relation
	imports 20 packages, and imported by 3 packages

Involved Source Files encode.go encode_ast.gen.go Package godoc is for rendering Go documentation. render.go test_helper.go
Package-Level Type Names (total 4, in which 3 are exported)
/* sort exporteds by: | */
A File contains everything needed about a source file to render documentation. AST *ast.File // full file pathname relative to zip content directory
A Package contains package-level information needed to render Go documentation. encPackage.Files []*File encPackage.ModulePackagePaths map[string]bool Fset *token.FileSet AddFile adds a file to the Package. After it returns, the contents of the ast.File are unsuitable for anything other than the methods of this package. DocInfo returns information extracted from the package's documentation. This destroys p's AST; do not call any methods of p after it returns. Encode encodes a Package into a byte slice. During its operation, Encode modifies the AST, but it restores it to a state suitable for rendering before it returns. Render renders the documentation for the package. Rendering destroys p's AST; do not call any methods of p after it returns. func DecodePackage(data []byte) (_ *Package, err error) func NewPackage(fset *token.FileSet, modPaths map[string]bool) *Package
Package-Level Functions (total 218, in which 3 are exported)
DecodPackage decodes a byte slice encoded with Package.Encode into a Package.
NewPackage returns a new Package with the given fset and set of module package paths.
RenderFromUnit is a convenience function that first decodes the source in the unit, which must exist, and then calls Render.
Package-Level Variables (total 4, all are exported)
ErrInvalidEncodingType is returned when the data to DecodePackage has an invalid encoding type.
MaxDocumentationHTML is a limit on the rendered documentation HTML size. The current limit of is based on the largest packages that pkg.go.dev has encountered. See https://golang.org/issue/40576. It is a variable for testing.
Used by the gen program to generate encodings for unexported types.
Package-Level Constants (total 5, in which 1 are exported)
Exported for tests.