Document application-owned alias contracts
This commit is contained in:
@@ -16,6 +16,15 @@ alias. Its declaration slice mixes the canonical group and routing rules as
|
||||
`Invocation.CanonicalPath()` so the alternate route and its canonical target
|
||||
are visible in the output.
|
||||
|
||||
Integration factories also return `commandkit.Command` and can be passed
|
||||
directly to `New` beside `commandkit.Alias` or flag-alias declarations. For a
|
||||
command-only `[]commandkit.Command`, convert its elements into a
|
||||
`[]commandkit.Declaration` before appending routing rules; Go cannot expand the
|
||||
command slice as `...commandkit.Declaration`. The
|
||||
[consumer guide](../../docs/consumers/guide.md#application-owned-aliases)
|
||||
shows both forms, and the [composed consumer](../../integrations/ckprompt/examples/composed)
|
||||
is the maintained integration example.
|
||||
|
||||
These aliases use the current local CommandKit source. Published CommandKit
|
||||
v0.2.0 does not include alias declarations; consumers can use them after the
|
||||
next core release. Repository contributors can run its test with
|
||||
|
||||
Reference in New Issue
Block a user