Documentation
¶
Overview ¶
Package attach is the gtb-only `attach` command. It attaches whole external Cobra command trees — from a separate Go module — onto a generated project's root, as a first-class, regeneration-safe manifest entity. It replaces the hand-edited cmd/<tool>/main.go + .gtb/ignore workaround: because the attachment lives in .gtb/manifest.yaml and is re-rendered into the root on every regenerate, `gtb regenerate` and `gtb enable signing` never drop it.
Two channels:
- `attach command <module>@<version>` — declarative: name a constructor and the props-derived dependencies it takes; gtb renders the call into the root and pins the module require. Re-run for each constructor from the same module.
- `attach adapter` — the escape hatch: scaffold a small author-owned pkg/cmd/external/attach.go for any shape the declarative vocabulary cannot express.
This package lives under internal/cmd/ because the commands belong to the framework author, not downstream consumers. See https://gitlab.com/phpboyscout/go-tool-base/-/wikis/specs/0182-external-command-attachment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.