clitest

package
v0.5.0-beta.1 Latest Latest
Warning

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

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

Documentation

Overview

Package clitest assembles the full pgedge command tree for build-gate tests. It lives in its own package so it can import both internal/cli and the modules (internal/starfleet, internal/controlplane) without the import cycle that would arise if these gates lived in cli itself.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullTree

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

FullTree returns the complete pgedge command tree as shipped: the root command plus every registered module, wired the same way main.go wires them. The runtime is a zero-value Runtime, which NewRootCmd and the module constructors accept for the structural checks the gates perform.

func Modules

func Modules() []module.Module

Modules is the set of modules the shipped binary carries, in the same order main.go registers them. Both FullTree and the version gate build from this one slice, so adding a module here (as main.go must also do) brings it 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 is the one derivation of the page set the generator and every gate share: a module that ships a page not listed here cannot exist, because this reads the modules.

func ReferenceFiles

func ReferenceFiles() []string

ReferenceFiles returns every reference document as a path relative to this package: the root index, then every module page. Gates that scan prose walk this rather than globbing for llms.txt, which is how two sweeps missed the nested byoc and managed files and how any glob would now miss 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 gate that used to read a module's one llms.txt reads this instead, because the split moved prose onto pages without moving it out of that module.

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. Gates keyed by module use it so a page inherits its module's configuration instead of needing its own row.

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