Documentation ¶
Index ¶
- func GetAlias(ctx context.Context) string
- func GetClipTimeout(ctx context.Context) int
- func GetConcurrency(ctx context.Context) int
- func GetConfigDir(ctx context.Context) string
- func HasAlias(ctx context.Context) bool
- func HasAlwaysYes(ctx context.Context) bool
- func HasAskForMore(ctx context.Context) bool
- func HasAutoClip(ctx context.Context) bool
- func HasAutoPrint(ctx context.Context) bool
- func HasClipTimeout(ctx context.Context) bool
- func HasColor(ctx context.Context) bool
- func HasConcurrency(ctx context.Context) bool
- func HasConfigDir(ctx context.Context) bool
- func HasDebug(ctx context.Context) bool
- func HasEditRecipients(ctx context.Context) bool
- func HasForce(ctx context.Context) bool
- func HasFuzzySearch(ctx context.Context) bool
- func HasGitCommit(ctx context.Context) bool
- func HasGitInit(ctx context.Context) bool
- func HasInteractive(ctx context.Context) bool
- func HasNoColor(ctx context.Context) bool
- func HasNoConfirm(ctx context.Context) bool
- func HasNoPager(ctx context.Context) bool
- func HasNotifications(ctx context.Context) bool
- func HasProgressCallback(ctx context.Context) bool
- func HasShowSafeContent(ctx context.Context) bool
- func HasStdin(ctx context.Context) bool
- func HasTerminal(ctx context.Context) bool
- func HasUseSymbols(ctx context.Context) bool
- func HasVerbose(ctx context.Context) bool
- func IsAlwaysYes(ctx context.Context) bool
- func IsAskForMore(ctx context.Context) bool
- func IsAutoClip(ctx context.Context) bool
- func IsAutoPrint(ctx context.Context) bool
- func IsColor(ctx context.Context) bool
- func IsDebug(ctx context.Context) bool
- func IsEditRecipients(ctx context.Context) bool
- func IsForce(ctx context.Context) bool
- func IsFuzzySearch(ctx context.Context) bool
- func IsGitCommit(ctx context.Context) bool
- func IsGitInit(ctx context.Context) bool
- func IsInteractive(ctx context.Context) bool
- func IsNoColor(ctx context.Context) bool
- func IsNoConfirm(ctx context.Context) bool
- func IsNoPager(ctx context.Context) bool
- func IsNotifications(ctx context.Context) bool
- func IsShowSafeContent(ctx context.Context) bool
- func IsStdin(ctx context.Context) bool
- func IsTerminal(ctx context.Context) bool
- func IsUseSymbols(ctx context.Context) bool
- func IsVerbose(ctx context.Context) bool
- func WithAlias(ctx context.Context, alias string) context.Context
- func WithAlwaysYes(ctx context.Context, bv bool) context.Context
- func WithAskForMore(ctx context.Context, afm bool) context.Context
- func WithAutoClip(ctx context.Context, bv bool) context.Context
- func WithAutoPrint(ctx context.Context, bv bool) context.Context
- func WithClipTimeout(ctx context.Context, to int) context.Context
- func WithColor(ctx context.Context, color bool) context.Context
- func WithConcurrency(ctx context.Context, to int) context.Context
- func WithConfigDir(ctx context.Context, cfgdir string) context.Context
- func WithDebug(ctx context.Context, dbg bool) context.Context
- func WithEditRecipients(ctx context.Context, bv bool) context.Context
- func WithForce(ctx context.Context, bv bool) context.Context
- func WithFuzzySearch(ctx context.Context, fuzzy bool) context.Context
- func WithGitCommit(ctx context.Context, bv bool) context.Context
- func WithGitInit(ctx context.Context, bv bool) context.Context
- func WithInteractive(ctx context.Context, isInteractive bool) context.Context
- func WithNoColor(ctx context.Context, bv bool) context.Context
- func WithNoConfirm(ctx context.Context, bv bool) context.Context
- func WithNoPager(ctx context.Context, bv bool) context.Context
- func WithNotifications(ctx context.Context, verbose bool) context.Context
- func WithProgressCallback(ctx context.Context, cb ProgressCallback) context.Context
- func WithShowSafeContent(ctx context.Context, bv bool) context.Context
- func WithStdin(ctx context.Context, isStdin bool) context.Context
- func WithTerminal(ctx context.Context, isTerm bool) context.Context
- func WithUseSymbols(ctx context.Context, bv bool) context.Context
- func WithVerbose(ctx context.Context, verbose bool) context.Context
- type ProgressCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClipTimeout ¶
GetClipTimeout returns the value of clip timeout or the default (45)
func GetConcurrency ¶
GetConcurrency returns the value of concurrent threads or the default (1)
func GetConfigDir ¶ added in v1.8.4
GetConfigDir returns the config dir if set or an empty string.
func HasAlwaysYes ¶
HasAlwaysYes returns true if a value for AlwaysYes has been set in this context
func HasAskForMore ¶ added in v1.7.0
HasAskForMore returns true if a value for AskForMore has been set in this context
func HasAutoClip ¶
HasAutoClip returns true if a value for AutoClip has been set in this context
func HasAutoPrint ¶ added in v1.8.5
HasAutoPrint returns true if a specific value for auto print was set.
func HasClipTimeout ¶
HasClipTimeout returns true if a value for ClipTimeout has been set in this context
func HasConcurrency ¶
HasConcurrency returns true if a value for Concurrency has been set in this context and is bigger than 1 since if it is equal to 1, we are not working concurrently.
func HasConfigDir ¶ added in v1.8.4
HasConfigDir returns true if a config dir has been set.
func HasDebug ¶ added in v1.7.0
HasDebug returns true if a value for debug has been set in this context
func HasEditRecipients ¶ added in v1.7.0
HasEditRecipients returns true if a value for EditRecipients has been set in this context
func HasFuzzySearch ¶
HasFuzzySearch returns true if a value for FuzzySearch has been set in this context
func HasGitCommit ¶
HasGitCommit returns true if a value for GitCommit has been set in this context
func HasGitInit ¶
HasGitInit returns true if the git init flag was set.
func HasInteractive ¶
HasInteractive returns true if a value for Interactive has been set in this context
func HasNoColor ¶
HasNoColor returns true if a value for NoColor has been set in this context
func HasNoConfirm ¶ added in v1.7.0
HasNoConfirm returns true if a value for NoConfirm has been set in this context
func HasNoPager ¶
HasNoPager returns true if a value for NoPager has been set in this context
func HasNotifications ¶
HasNotifications returns true if a value for Notifications has been set in this context
func HasProgressCallback ¶
HasProgressCallback returns true if a ProgressCallback has been set
func HasShowSafeContent ¶
HasShowSafeContent returns true if a value for ShowSafeContent has been set in this context
func HasTerminal ¶
HasTerminal returns true if a value for Terminal has been set in this context
func HasUseSymbols ¶ added in v1.7.0
HasUseSymbols returns true if a value for UseSymbols has been set in this context
func HasVerbose ¶
HasVerbose returns true if a value for Verbose has been set in this context
func IsAlwaysYes ¶
IsAlwaysYes returns the value of always yes or the default (false)
func IsAskForMore ¶ added in v1.7.0
IsAskForMore returns the value of ask for more or the default (false)
func IsAutoClip ¶
IsAutoClip returns the value of AutoClip or the default (true)
func IsAutoPrint ¶ added in v1.8.5
IsAutoPrint returns the value of auto print or false if none was set.
func IsEditRecipients ¶ added in v1.7.0
IsEditRecipients returns the value of EditRecipients or the default (false)
func IsFuzzySearch ¶
IsFuzzySearch return the value of fuzzy search or the default (true)
func IsGitCommit ¶
IsGitCommit returns the value of git commit or the default (true)
func IsInteractive ¶
IsInteractive returns the value of interactive or the default (true)
func IsNoConfirm ¶ added in v1.7.0
IsNoConfirm returns the value of ask for more or the default (false)
func IsNotifications ¶
IsNotifications returns the value of Notifications or the default (true)
func IsShowSafeContent ¶
IsShowSafeContent returns the value of ShowSafeContent or the default (false)
func IsStdin ¶
IsStdin returns the value of stdin, i.e. if it's true some data is being piped to stdin. If not set it returns the default value (false)
func IsTerminal ¶
IsTerminal returns the value of terminal or the default (true)
func IsUseSymbols ¶ added in v1.7.0
IsUseSymbols returns the value of ask for more or the default (false)
func WithAlwaysYes ¶
WithAlwaysYes returns a context with the value of always yes set
func WithAskForMore ¶ added in v1.7.0
WithAskForMore returns a context with the value for ask for more set
func WithAutoClip ¶
WithAutoClip returns a context with the value for AutoClip set
func WithAutoPrint ¶ added in v1.8.5
WithAutoPrint returns a context with the value for auto print set.
func WithClipTimeout ¶
WithClipTimeout returns a context with the value for clip timeout set
func WithConcurrency ¶
WithConcurrency returns a context with the value for clip timeout set
func WithConfigDir ¶ added in v1.8.4
WithConfigDir returns a context with the config dir set.
func WithEditRecipients ¶ added in v1.7.0
WithEditRecipients returns a context with the value for EditRecipients set
func WithFuzzySearch ¶
WithFuzzySearch returns a context with the value for fuzzy search set
func WithGitCommit ¶
WithGitCommit returns a context with the value of git commit set
func WithGitInit ¶
WithGitInit returns a context with the value for the git init flag set.
func WithInteractive ¶
WithInteractive returns a context with an explicit value for interactive
func WithNoColor ¶
WithNoColor returns a context with the value for ask for more set
func WithNoConfirm ¶ added in v1.7.0
WithNoConfirm returns a context with the value for ask for more set
func WithNoPager ¶
WithNoPager returns a context with the value for ask for more set
func WithNotifications ¶
WithNotifications returns a context with the value for Notifications set
func WithProgressCallback ¶
func WithProgressCallback(ctx context.Context, cb ProgressCallback) context.Context
WithProgressCallback returns a context with the value of ProgressCallback set
func WithShowSafeContent ¶
WithShowSafeContent returns a context with the value for ShowSafeContent set
func WithStdin ¶
WithStdin returns a context with the value for Stdin set. If true some input is available on Stdin (e.g. something is being piped into it)
func WithTerminal ¶
WithTerminal returns a context with an explicit value for terminal
func WithUseSymbols ¶ added in v1.7.0
WithUseSymbols returns a context with the value for ask for more set
Types ¶
type ProgressCallback ¶
type ProgressCallback func()
ProgressCallback is a callback for updateing progress
func GetProgressCallback ¶
func GetProgressCallback(ctx context.Context) ProgressCallback
GetProgressCallback return the set progress callback or a default one. It never returns nil