commands

package
v0.0.0-...-b9cffea Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package commands is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	// AppendArgs appends a couple of args to the Cmd.
	AppendArgs(args ...string)
	// String prints the command.
	String() string
	// Run launches the command and return the stdout, stderr.
	Run(ctx context.Context) (string, string, error)
	// Execute launches the command and return error, and print stdout and stderr to console.
	Execute(ctx context.Context) error
}

Cmd is the command constructor and runner.

func New

func New(name string, dryrun bool) Cmd

New creates a Cmd object.

type MockCmd

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

MockCmd is a mock of Cmd interface.

func NewMockCmd

func NewMockCmd(ctrl *gomock.Controller) *MockCmd

NewMockCmd creates a new mock instance.

func (*MockCmd) AppendArgs

func (m *MockCmd) AppendArgs(args ...string)

AppendArgs mocks base method.

func (*MockCmd) EXPECT

func (m *MockCmd) EXPECT() *MockCmdMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCmd) Execute

func (m *MockCmd) Execute(ctx context.Context) error

Execute mocks base method.

func (*MockCmd) Run

func (m *MockCmd) Run(ctx context.Context) (string, string, error)

Run mocks base method.

func (*MockCmd) String

func (m *MockCmd) String() string

String mocks base method.

type MockCmdMockRecorder

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

MockCmdMockRecorder is the mock recorder for MockCmd.

func (*MockCmdMockRecorder) AppendArgs

func (mr *MockCmdMockRecorder) AppendArgs(args ...interface{}) *gomock.Call

AppendArgs indicates an expected call of AppendArgs.

func (*MockCmdMockRecorder) Execute

func (mr *MockCmdMockRecorder) Execute(ctx interface{}) *gomock.Call

Execute indicates an expected call of Execute.

func (*MockCmdMockRecorder) Run

func (mr *MockCmdMockRecorder) Run(ctx interface{}) *gomock.Call

Run indicates an expected call of Run.

func (*MockCmdMockRecorder) String

func (mr *MockCmdMockRecorder) String() *gomock.Call

String indicates an expected call of String.

Jump to

Keyboard shortcuts

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