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 ¶
- func FullTree() (*cobra.Command, error)
- func Modules() []module.Module
- func ReferenceDocuments() []module.Document
- func ReferenceFiles() []string
- func ReferenceFilesFor(moduleDir string) []string
- func ReferenceModuleDir(file string) string
- func RootPages() []module.Document
- func RoutingFor(all []*cobra.Command, docs []module.Document, scope string) []docgen.RoutingEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullTree ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.