Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromCmd ¶
func FromCmd(ctx context.Context, cmd *cobra.Command, configTheme string, mdOpts ...glamour.TermRendererOption) context.Context
FromCmd builds iostream Options from cmd and returns a context carrying the resulting Streams.
Streams come from the command's In/Out/Err, so anything cobra has redirected (as tests do) is honoured. The --quiet and --debug persistent flags are read when registered; a command that does not define them simply gets false, which is why the small internal tools under cmd/ can call this while registering only --debug.
mdOpts are passed straight through to Options.MarkdownOptions.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.