ctxutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClipTimeout

func GetClipTimeout(ctx context.Context) int

GetClipTimeout returns the value of clip timeout or the default (45)

func HasAlwaysYes

func HasAlwaysYes(ctx context.Context) bool

HasAlwaysYes returns true if a value for AlwaysYes has been set in this context

func HasAskForMore

func HasAskForMore(ctx context.Context) bool

HasAskForMore returns true if a value for AskForMore has been set in this context

func HasClipTimeout

func HasClipTimeout(ctx context.Context) bool

HasClipTimeout returns true if a value for ClipTimeout has been set in this context

func HasColor

func HasColor(ctx context.Context) bool

HasColor returns true if a value for Color has been set in this context

func HasDebug

func HasDebug(ctx context.Context) bool

HasDebug returns true if a value for debug has been set in this context

func HasGitCommit

func HasGitCommit(ctx context.Context) bool

HasGitCommit returns true if a value for GitCommit has been set in this context

func HasInteractive

func HasInteractive(ctx context.Context) bool

HasInteractive returns true if a value for Interactive has been set in this context

func HasNoConfirm

func HasNoConfirm(ctx context.Context) bool

HasNoConfirm returns true if a value for NoConfirm has been set in this context

func HasNoPager

func HasNoPager(ctx context.Context) bool

HasNoPager returns true if a value for NoPager has been set in this context

func HasShowSafeContent

func HasShowSafeContent(ctx context.Context) bool

HasShowSafeContent returns true if a value for ShowSafeContent has been set in this context

func HasStdin

func HasStdin(ctx context.Context) bool

HasStdin returns true if a value for Stdin has been set in this context

func HasTerminal

func HasTerminal(ctx context.Context) bool

HasTerminal returns true if a value for Terminal has been set in this context

func IsAlwaysYes

func IsAlwaysYes(ctx context.Context) bool

IsAlwaysYes returns the value of always yes or the default (false)

func IsAskForMore

func IsAskForMore(ctx context.Context) bool

IsAskForMore returns the value of ask for more or the default (false)

func IsColor

func IsColor(ctx context.Context) bool

IsColor returns the value of color or the default (true)

func IsDebug

func IsDebug(ctx context.Context) bool

IsDebug returns the value of debug or the default (false)

func IsGitCommit

func IsGitCommit(ctx context.Context) bool

IsGitCommit returns the value of git commit or the default (true)

func IsInteractive

func IsInteractive(ctx context.Context) bool

IsInteractive returns the value of interactive or the default (true)

func IsNoConfirm

func IsNoConfirm(ctx context.Context) bool

IsNoConfirm returns the value of ask for more or the default (false)

func IsNoPager

func IsNoPager(ctx context.Context) bool

IsNoPager returns the value of ask for more or the default (false)

func IsShowSafeContent

func IsShowSafeContent(ctx context.Context) bool

IsShowSafeContent returns the value of ask for more or the default (false)

func IsStdin

func IsStdin(ctx context.Context) bool

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

func IsTerminal(ctx context.Context) bool

IsTerminal returns the value of terminal or the default (true)

func WithAlwaysYes

func WithAlwaysYes(ctx context.Context, bv bool) context.Context

WithAlwaysYes returns a context with the value of always yes set

func WithAskForMore

func WithAskForMore(ctx context.Context, afm bool) context.Context

WithAskForMore returns a context with the value for ask for more set

func WithClipTimeout

func WithClipTimeout(ctx context.Context, to int) context.Context

WithClipTimeout returns a context with the value for clip timeout set

func WithColor

func WithColor(ctx context.Context, color bool) context.Context

WithColor returns a context with an explizit value for color

func WithDebug

func WithDebug(ctx context.Context, dbg bool) context.Context

WithDebug returns a context with an explizit value for debug

func WithGitCommit

func WithGitCommit(ctx context.Context, bv bool) context.Context

WithGitCommit returns a context with the value of git commit set

func WithInteractive

func WithInteractive(ctx context.Context, isInteractive bool) context.Context

WithInteractive returns a context with an explizit value for interactive

func WithNoConfirm

func WithNoConfirm(ctx context.Context, bv bool) context.Context

WithNoConfirm returns a context with the value for ask for more set

func WithNoPager

func WithNoPager(ctx context.Context, bv bool) context.Context

WithNoPager returns a context with the value for ask for more set

func WithShowSafeContent

func WithShowSafeContent(ctx context.Context, bv bool) context.Context

WithShowSafeContent returns a context with the value for ask for more set

func WithStdin

func WithStdin(ctx context.Context, isStdin bool) context.Context

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

func WithTerminal(ctx context.Context, isTerm bool) context.Context

WithTerminal returns a context with an explizit value for terminal

Types

This section is empty.

Jump to

Keyboard shortcuts

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