commands

package
v2.0.0-citest.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagEndpoint = "endpoint"
	FlagToken    = "token"
	FlagDump     = "dump"
	FlagDryRun   = "dry-run"
	FlagFormat   = "format"
)
View Source
const (
	FormatJSON  = "json"
	FormatTable = "table"
	FormatCSV   = "csv"
)

Variables

View Source
var (
	Name            = build.Name
	Version         = "dev"
	DefaultEndpoint = build.DefaultEndpoint
)
View Source
var Config config
View Source
var Root = cobra.Command{
	Use:           Name,
	Short:         build.Description,
	Version:       Version,
	SilenceErrors: true,
}

Functions

func Add

func Add(parent *cobra.Command, builder ...CommandBuilder)

func Confirm

func Confirm(message string) bool

func ConfirmDeletion

func ConfirmDeletion(kind string, item fmt.Stringer) bool

func FormatAndIndent

func FormatAndIndent(text string, indent int) string

func FormatExamples

func FormatExamples(examples string) string

func FormatHelp

func FormatHelp(help string) string

func Print

func Print(out console.Writer, val interface{}) error

func PrintStdout

func PrintStdout(val interface{}) error

func Run

func Run()

Types

type CommandBuilder

type CommandBuilder interface {
	Build() *cobra.Command
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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