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

extensioncommand

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package extensioncommand shares the model-extension maintenance command grammar and bounded page output. Orphan inspection is read-only; re-scoping writes only with an explicit --apply. Feature commands borrow managers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run[R any](ctx context.Context, options Options, out io.Writer, inspect func(context.Context, extensions.OwnerName, extensionmaintenance.Cursor, int) (extensionmaintenance.Page[R], error), columns func(R) []string) error

func RunRescope

RunRescope pages through stale rows, moving them only for --apply. Output contains opaque row keys only; rows left in place are listed with a "conflict", "missing" (subject no longer exists) or "undeclared" (recorded under a model the owner does not declare) marker.

func RunUndeclared

func RunUndeclared(ctx context.Context, options Options, out io.Writer, inspect func(context.Context, extensions.OwnerName) (extensionmaintenance.Undeclared, error)) error

RunUndeclared prints stored names of the owner's scope that no current registration declares, one per line, and a final "(truncated)" marker, which no stored name can equal, when the bounded read stopped early. It reads names only and modifies nothing.

Types

type Options

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

func Parse

func Parse(name string, args []string, help io.Writer) (Options, error)

Parse accepts only the read-only orphan inspection form.

func ParseMaintenance

func ParseMaintenance(name string, args []string, help io.Writer) (Options, error)

ParseMaintenance also accepts the re-scope form for features that support it.

func (Options) Rescope

func (o Options) Rescope() bool

Rescope reports whether the parsed command is the re-scope maintenance form.

func (Options) Undeclared

func (o Options) Undeclared() bool

Undeclared reports whether the parsed command lists undeclared stored names.

Jump to

Keyboard shortcuts

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