CapabilityLine returns the single-line capability bit a conforming CLI emits in response to ` help --capabilities` (or the `--cmdhelp-capabilities` fallback form). Per spec §8: - Format: `cmdhelp/ . : ` - Single-line, parseable, stable across releases. - Th
(formats []string)
| 25 | // imply any default set so different binaries can advertise different |
| 26 | // surfaces (e.g. a future cmdhelp v0.2 might add formats). |
| 27 | func CapabilityLine(formats []string) string { |
| 28 | return fmt.Sprintf("cmdhelp/%s: %s", Version, strings.Join(formats, ", ")) |
| 29 | } |
| 30 | |
| 31 | // Options configure a Build/EmitJSON call. All fields are optional except |
| 32 | // Binary, which is used as the document's `binary` key. |