cmd

package
v0.0.0-...-942ebe2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err

func Err(cmd *cobra.Command, msg string) error

func Execute

func Execute()

func Msg

func Msg(cmd *cobra.Command, msg string)

Types

type CommandExecutor

type CommandExecutor struct{}

func (*CommandExecutor) Init

func (c *CommandExecutor) Init(path string) ([]byte, error)

func (*CommandExecutor) Tidy

func (c *CommandExecutor) Tidy(path string) ([]byte, error)

type Executor

type Executor interface {
	Init(path string) ([]byte, error)
	Tidy(path string) ([]byte, error)
}

type MockExecutor

type MockExecutor struct {
	mock.Mock
}

MockExecutor is an autogenerated mock type for the Executor type

func NewMockExecutor

func NewMockExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockExecutor

NewMockExecutor creates a new instance of MockExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockExecutor) EXPECT

func (_m *MockExecutor) EXPECT() *MockExecutor_Expecter

func (*MockExecutor) Init

func (_m *MockExecutor) Init(path string) ([]byte, error)

Init provides a mock function with given fields: path

func (*MockExecutor) Tidy

func (_m *MockExecutor) Tidy(path string) ([]byte, error)

Tidy provides a mock function with given fields: path

type MockExecutor_Expecter

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

func (*MockExecutor_Expecter) Init

func (_e *MockExecutor_Expecter) Init(path interface{}) *MockExecutor_Init_Call

Init is a helper method to define mock.On call

  • path string

func (*MockExecutor_Expecter) Tidy

func (_e *MockExecutor_Expecter) Tidy(path interface{}) *MockExecutor_Tidy_Call

Tidy is a helper method to define mock.On call

  • path string

type MockExecutor_Init_Call

type MockExecutor_Init_Call struct {
	*mock.Call
}

MockExecutor_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'

func (*MockExecutor_Init_Call) Return

func (_c *MockExecutor_Init_Call) Return(_a0 []byte, _a1 error) *MockExecutor_Init_Call

func (*MockExecutor_Init_Call) Run

func (_c *MockExecutor_Init_Call) Run(run func(path string)) *MockExecutor_Init_Call

func (*MockExecutor_Init_Call) RunAndReturn

func (_c *MockExecutor_Init_Call) RunAndReturn(run func(string) ([]byte, error)) *MockExecutor_Init_Call

type MockExecutor_Tidy_Call

type MockExecutor_Tidy_Call struct {
	*mock.Call
}

MockExecutor_Tidy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tidy'

func (*MockExecutor_Tidy_Call) Return

func (_c *MockExecutor_Tidy_Call) Return(_a0 []byte, _a1 error) *MockExecutor_Tidy_Call

func (*MockExecutor_Tidy_Call) Run

func (_c *MockExecutor_Tidy_Call) Run(run func(path string)) *MockExecutor_Tidy_Call

func (*MockExecutor_Tidy_Call) RunAndReturn

func (_c *MockExecutor_Tidy_Call) RunAndReturn(run func(string) ([]byte, error)) *MockExecutor_Tidy_Call

Jump to

Keyboard shortcuts

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