util

package
v0.0.0-...-4f9d474 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultErrorExitCode = 1
)

Variables

View Source
var ErrExit = fmt.Errorf("exit")

Functions

func AddProfilingFlags

func AddProfilingFlags(flags *pflag.FlagSet)

func CheckErr

func CheckErr(err error)

func DefaultSubCommandRun

func DefaultSubCommandRun(out io.Writer) func(c *cobra.Command, args []string)

func FlushProfiling

func FlushProfiling() error

func InitProfiling

func InitProfiling() error

func RequireNoArguments

func RequireNoArguments(c *cobra.Command, args []string)

func TableWriterDefaultConfig

func TableWriterDefaultConfig(table *tablewriter.Table) *tablewriter.Table

func UsageErrorf

func UsageErrorf(cmd *cobra.Command, format string, args ...interface{}) error

Types

type CommandGroup

type CommandGroup struct {
	Message  string
	Commands []*cobra.Command
}

type CommandGroups

type CommandGroups []CommandGroup

func (CommandGroups) AddTo

func (g CommandGroups) AddTo(c *cobra.Command)

func (CommandGroups) Has

func (g CommandGroups) Has(c *cobra.Command) bool

type Factory

type Factory interface {
	clioptions.RESTClientGetter
	RESTClient() (*rest.RESTClient, error)
}

func NewFactory

func NewFactory(clientGetter clioptions.RESTClientGetter) Factory

type MatchVersionFlags

type MatchVersionFlags struct {
	Delegate clioptions.RESTClientGetter

	RequireMatchedServerVersion bool
	// contains filtered or unexported fields
}

func NewMatchVersionFlags

func NewMatchVersionFlags(delegate clioptions.RESTClientGetter) *MatchVersionFlags

func (*MatchVersionFlags) AddFlags

func (f *MatchVersionFlags) AddFlags(flags *pflag.FlagSet)

func (*MatchVersionFlags) ToRESTConfig

func (f *MatchVersionFlags) ToRESTConfig() (*rest.Config, error)

func (*MatchVersionFlags) ToRawSKTConfigLoader

func (f *MatchVersionFlags) ToRawSKTConfigLoader() client.ClientConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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