iostreamcobra

package
v1.0.49012 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL