shared

package
v1.501.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrettyError

func GetPrettyError(cmd *cobra.Command, err error) error

func ProcessQueries

func ProcessQueries(presets []*PresetQuery) (map[string]*PresetQuery, []string, error)

func ReplacePlaceholders

func ReplacePlaceholders(query string, args []string, p func(label string) PromptRunner) (string, error)

func RunQuery

func RunQuery(bzl bazel.Bazel, command string, streams ioutils.Streams, flags []string, args []string) error

func SelectQuery

func SelectQuery(
	verb string,
	processedPresets map[string]*PresetQuery,
	rawPresets []*PresetQuery,
	presetNames []string,
	streams ioutils.Streams,
	args []string,
	s func(presetNames []string) SelectRunner,
) (string, string, bool, error)

Types

type ConfirmationRunner

type ConfirmationRunner interface {
	Run() (string, error)
}

func Confirmation

func Confirmation(question string) ConfirmationRunner

type PresetQuery

type PresetQuery struct {
	Name        string
	Description string
	Query       string
	Verb        string
}

func PrecannedQueries

func PrecannedQueries(verb string, viper viper.Viper) []*PresetQuery

type PromptRunner

type PromptRunner interface {
	Run() (string, error)
}

func Prompt

func Prompt(label string) PromptRunner

type SelectRunner

type SelectRunner interface {
	Run() (int, string, error)
}

func Select

func Select(presetNames []string) SelectRunner

Directories

Path Synopsis
Package mock contains generated files.
Package mock contains generated files.

Jump to

Keyboard shortcuts

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