flags

package
v0.0.0-...-57fe098 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package flags configures and reads global ("persistent") flags and flags that are used by multiple commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromSource

func FromSource(cmd *cobra.Command) (source string, noResolve bool, _ error)

FromSource returns the source name passed via --from-source. It returns an empty string if --from-source is omitted.

func IsInteractive

func IsInteractive(cmd *cobra.Command) bool

IsInteractive returns true if cmd allows interactive prompts.

func IsVerbose

func IsVerbose(cmd *cobra.Command) bool

IsVerbose returns true if the --verbose flag was set.

func SetupFromSource

func SetupFromSource(cmd *cobra.Command, con *imbue.Container)

SetupFromSource sets up the --from-source (and --no-resolve) flags used by commands that resolve query strings to repositories.

func SetupNoInteractive

func SetupNoInteractive(cmd *cobra.Command)

SetupNoInteractive sets up the --no-interaction flag on the root command.

func SetupShellExecutorOutput

func SetupShellExecutorOutput(cmd *cobra.Command)

SetupShellExecutorOutput sets up --shell-executor-output flag on the root command.

func SetupSocket

func SetupSocket(cmd *cobra.Command)

SetupSocket sets up the --socket flag on the root command.

func SetupVerbose

func SetupVerbose(cmd *cobra.Command)

SetupVerbose sets up the --verbose flag on the root command.

func ShellExecutorOutputFile

func ShellExecutorOutputFile(cmd *cobra.Command) (string, bool)

ShellExecutorOutputFile returns the path to the file that the shell.Executor should write its command to, if any.

func Socket

func Socket(cmd *cobra.Command) (string, error)

Socket returns the path to the Unix socket address of the Grit daemon.

Types

This section is empty.

Jump to

Keyboard shortcuts

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