docs

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package docs provides documentation extraction for source files referenced by ctx when the --doc flag is used.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector routes documentation lookups to language-specific extractors.

func NewCollector

func NewCollector(repositoryRoot string) (*Collector, error)

NewCollector creates a Collector using the repository root that contains go.mod.

func NewCollectorWithOptions

func NewCollectorWithOptions(repositoryRoot string, options CollectorOptions) (*Collector, error)

NewCollectorWithOptions creates a Collector with the supplied options.

func (*Collector) ActivateRemoteDocumentation

func (collector *Collector) ActivateRemoteDocumentation(ctx context.Context)

ActivateRemoteDocumentation stores the context used for remote lookups.

func (*Collector) CollectFromFile

func (collector *Collector) CollectFromFile(filePath string) ([]types.DocumentationEntry, error)

CollectFromFile returns documentation entries for the provided source file.

type CollectorOptions

type CollectorOptions struct {
	RemoteAttempt RemoteAttemptOptions
}

CollectorOptions configures optional documentation providers.

type RemoteAttemptOptions

type RemoteAttemptOptions struct {
	Enabled            bool
	APIBase            string
	AuthorizationToken string
}

RemoteAttemptOptions configures remote documentation lookup for third-party modules.

type RemoteDocumentationAttempt

type RemoteDocumentationAttempt struct {
	// contains filtered or unexported fields
}

RemoteDocumentationAttempt resolves documentation from GitHub for imported modules.

func (*RemoteDocumentationAttempt) Activate

func (attempt *RemoteDocumentationAttempt) Activate(ctx context.Context)

Activate stores the context that will be used for remote lookups.

func (*RemoteDocumentationAttempt) DocumentationForImport

func (attempt *RemoteDocumentationAttempt) DocumentationForImport(importPath string) []types.DocumentationEntry

DocumentationForImport returns remote documentation entries for the import path.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL