cast

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// FlagName is the global flag used to record command output as an asciicast.
	FlagName = cfg.CastFlagName

	// EnvName is the environment variable used to request cast recording.
	EnvName = cfg.CastEnvVarName
)

Variables

This section is empty.

Functions

func ActiveRecordingWidth

func ActiveRecordingWidth() int

ActiveRecordingWidth returns the terminal width (in columns) of the active cast recording, or 0 when no recording is running. Help rendering uses this so recorded output is laid out at the recorded terminal width.

func FinalizeRecording

func FinalizeRecording()

FinalizeRecording closes the active root-command cast recorder, if one is running.

func StartHelpRecording

func StartHelpRecording(cmd *cobra.Command, atmosConfig *schema.AtmosConfiguration) bool

StartHelpRecording starts a cast recording for help output when explicitly requested. Cobra renders help before the persistent pre-run hooks fire, so the custom help function must start the recorder itself. Help output still flows through the normal masked I/O writer, which is the sole path that records it. It returns true when a recording is active.

func StartRecordingIfRequested

func StartRecordingIfRequested(cmd *cobra.Command, atmosConfig *schema.AtmosConfiguration, args []string) error

StartRecordingIfRequested starts the root-command cast recorder when enabled by config or flag.

Types

type CommandProvider

type CommandProvider struct{}

func (*CommandProvider) GetAliases

func (p *CommandProvider) GetAliases() []internal.CommandAlias

func (*CommandProvider) GetCommand

func (p *CommandProvider) GetCommand() *cobra.Command

func (*CommandProvider) GetCompatibilityFlags

func (p *CommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag

func (*CommandProvider) GetFlagsBuilder

func (p *CommandProvider) GetFlagsBuilder() flags.Builder

func (*CommandProvider) GetGroup

func (p *CommandProvider) GetGroup() string

func (*CommandProvider) GetName

func (p *CommandProvider) GetName() string

func (*CommandProvider) GetPositionalArgsBuilder

func (p *CommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder

func (*CommandProvider) IsExperimental

func (p *CommandProvider) IsExperimental() bool

Jump to

Keyboard shortcuts

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