Help us shape the future of Go! Take the 2026 Go Developer Survey

help

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package help exposes exact embedded help assets through the application layer.

Index

Constants

View Source
const (
	// TopicQuickstart is the entry-point help topic.
	TopicQuickstart = "quickstart"
	// TopicConfig documents configuration.
	TopicConfig = "config"
	// TopicProviders documents provider setup and readiness.
	TopicProviders = "providers"
	// TopicRolePaths documents provider execution paths.
	TopicRolePaths = "role-paths"
	// TopicPrompts documents prompt contracts.
	TopicPrompts = "prompts"
	// TopicWorkflows documents CLI workflows.
	TopicWorkflows = "workflows"
	// TopicArtifacts documents artifact storage and lineage.
	TopicArtifacts = "artifacts"
	// TopicValidation documents output validation.
	TopicValidation = "validation"
	// TopicCI documents CI reporting.
	TopicCI = "ci"
	// TopicExitCodes documents process exit codes.
	TopicExitCodes = "exit-codes"
	// TopicSecurity documents security and trust boundaries.
	TopicSecurity = "security"
)

Variables

View Source
var (
	// ErrNilCatalog reports construction or use without a ContractCatalog.
	ErrNilCatalog = errors.New("help: nil contract catalog")
	// ErrNilContext reports an invalid nil context.
	ErrNilContext = errors.New("help: nil context")
	// ErrEmptyTopic reports an empty help topic.
	ErrEmptyTopic = errors.New("help: empty topic")
	// ErrUnsafeTopic reports a topic that is not a canonical topic token.
	ErrUnsafeTopic = errors.New("help: unsafe topic")
	// ErrUnknownTopic reports a canonical but unsupported help topic.
	ErrUnknownTopic = errors.New("help: unknown topic")
	// ErrCatalogIncomplete reports a missing, duplicate, or unexpected help asset.
	ErrCatalogIncomplete = errors.New("help: incomplete contract catalog")
	// ErrCatalogInconsistent reports a Read result that differs from its listed asset.
	ErrCatalogInconsistent = errors.New("help: inconsistent contract catalog")
)

Functions

This section is empty.

Types

type Service

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

Service lists and renders the fixed help surface from a ContractCatalog.

func NewService

func NewService(catalog ports.ContractCatalog) (*Service, error)

NewService constructs a help service over catalog. Catalog completeness is checked for each Topics and Render operation with the caller's context.

func (*Service) Render

func (service *Service) Render(ctx context.Context, topic string) ([]byte, error)

Render returns a caller-owned, byte-for-byte copy of the authoritative help asset for topic. It never wraps, normalizes, colors, or appends to the asset.

func (*Service) Topics

func (service *Service) Topics(ctx context.Context) ([]ports.AssetMetadata, error)

Topics returns the complete fixed set of help metadata in ascending AssetID order. It rejects a catalog whose help inventory is not exactly the required application topic set.

Jump to

Keyboard shortcuts

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