commands

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUpgradeVersion

func CheckUpgradeVersion(ctx context.Context, force bool) string

CheckUpgradeVersion ...

func CommandLocator

func CommandLocator(ctx context.Context) []*cli.Command

CommandLocator builds a sorted slice of built-in and installed commands

func UpgradeCli

func UpgradeCli(ctx context.Context, latestVersion string) bool

UpgradeCli ...

Types

type Cmd added in v1.4.1

type Cmd interface {
	Run() error
}

Cmd is a wrapper for exec.Cmd methods

type Command added in v1.4.1

type Command struct {
	// contains filtered or unexported fields
}

Command represents an external command being prepared or run

func (*Command) Run added in v1.4.1

func (c *Command) Run() error

Run starts the command and waits for it to complete

type MockCmd added in v1.4.1

type MockCmd struct {
	mock.Mock
}

MockCmd is used to track activity on command.Command

func (*MockCmd) Run added in v1.4.1

func (c *MockCmd) Run() error

Run mimics the behavior of (*Command) Run()

func (*MockCmd) String added in v1.4.1

func (c *MockCmd) String() string

String mimics the behavior or (*Command) String()

Jump to

Keyboard shortcuts

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