clitest

package
v0.5.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: PostgreSQL Imports: 9 Imported by: 0

Documentation

Overview

Package clitest assembles the full pgedge command tree for build-gate tests. It is its own package so it can import both internal/cli and the modules without an import cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullTree

func FullTree() (*cobra.Command, error)

FullTree returns the pgedge command tree wired as main.go wires it, on a zero-value Runtime, which is enough for structural checks.

func Modules

func Modules() []module.Module

Modules is the set of modules the shipped binary carries, in the same order main.go registers them. FullTree and the version gate build from this slice, so a module added here (and in main.go) comes under every build gate.

func ReferenceDocuments

func ReferenceDocuments() []module.Document

ReferenceDocuments returns every page the shipped modules embed, in module order then scope order. It reads the modules, so it is the one page set the generator and every gate share.

func ReferenceFiles

func ReferenceFiles() []string

ReferenceFiles returns every reference document as a path relative to this package: the root index, then every module page. Prose gates walk this rather than globbing for llms.txt, which would miss the nested byoc and managed files and the pages under llms/.

func ReferenceFilesFor

func ReferenceFilesFor(moduleDir string) []string

ReferenceFilesFor returns the reference files of one module: its index and every page under it, keyed by the directory ReferenceModuleDir returns. A module's prose spans its index and its pages, so a per-module gate reads all of them.

func ReferenceModuleDir

func ReferenceModuleDir(file string) string

ReferenceModuleDir returns the module package directory a reference file belongs to, relative to this package ("../../internal/starfleet/byoc"), or "" for the root index, so a page inherits its module's gate configuration.

func RootPages

func RootPages() []module.Document

RootPages returns the root's own pages, without the index. An error means the embedded page set is malformed; TestRootPagesAreLoadedAndScanned fails on it.

func RoutingFor

func RoutingFor(all []*cobra.Command, docs []module.Document,
	scope string) []docgen.RoutingEntry

RoutingFor returns the routing rows for scope: its child pages, each with the Short of the command it documents, or an empty Short for a page that documents no command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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