modify

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	mock.Mock
}

Action is an autogenerated mock type for the Action type

func NewAction

func NewAction(t interface {
	mock.TestingT
	Cleanup(func())
}) *Action

NewAction creates a new instance of Action. 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 (*Action) EXPECT

func (_m *Action) EXPECT() *Action_Expecter

func (*Action) Execute

func (_m *Action) Execute(cursor *dstutil.Cursor)

Execute provides a mock function with given fields: cursor

type Action_Execute_Call

type Action_Execute_Call struct {
	*mock.Call
}

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

func (*Action_Execute_Call) Return

func (*Action_Execute_Call) Run

func (_c *Action_Execute_Call) Run(run func(cursor *dstutil.Cursor)) *Action_Execute_Call

func (*Action_Execute_Call) RunAndReturn

func (_c *Action_Execute_Call) RunAndReturn(run func(*dstutil.Cursor)) *Action_Execute_Call

type Action_Expecter

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

func (*Action_Expecter) Execute

func (_e *Action_Expecter) Execute(cursor interface{}) *Action_Execute_Call

Execute is a helper method to define mock.On call

  • cursor *dstutil.Cursor

type Apply

type Apply struct {
	mock.Mock
}

Apply is an autogenerated mock type for the Apply type

func NewApply

func NewApply(t interface {
	mock.TestingT
	Cleanup(func())
}) *Apply

NewApply creates a new instance of Apply. 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 (*Apply) Apply

func (_m *Apply) Apply() error

Apply provides a mock function with no fields

func (*Apply) EXPECT

func (_m *Apply) EXPECT() *Apply_Expecter

type Apply_Apply_Call

type Apply_Apply_Call struct {
	*mock.Call
}

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

func (*Apply_Apply_Call) Return

func (_c *Apply_Apply_Call) Return(_a0 error) *Apply_Apply_Call

func (*Apply_Apply_Call) Run

func (_c *Apply_Apply_Call) Run(run func()) *Apply_Apply_Call

func (*Apply_Apply_Call) RunAndReturn

func (_c *Apply_Apply_Call) RunAndReturn(run func() error) *Apply_Apply_Call

type Apply_Expecter

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

func (*Apply_Expecter) Apply

func (_e *Apply_Expecter) Apply() *Apply_Apply_Call

Apply is a helper method to define mock.On call

type File

type File struct {
	mock.Mock
}

File is an autogenerated mock type for the File type

func NewFile

func NewFile(t interface {
	mock.TestingT
	Cleanup(func())
}) *File

NewFile creates a new instance of File. 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 (*File) EXPECT

func (_m *File) EXPECT() *File_Expecter

func (*File) Overwrite

func (_m *File) Overwrite(content string, forces ...bool) modify.Apply

Overwrite provides a mock function with given fields: content, forces

func (*File) Remove

func (_m *File) Remove() modify.Apply

Remove provides a mock function with no fields

type File_Expecter

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

func (*File_Expecter) Overwrite

func (_e *File_Expecter) Overwrite(content interface{}, forces ...interface{}) *File_Overwrite_Call

Overwrite is a helper method to define mock.On call

  • content string
  • forces ...bool

func (*File_Expecter) Remove

func (_e *File_Expecter) Remove() *File_Remove_Call

Remove is a helper method to define mock.On call

type File_Overwrite_Call

type File_Overwrite_Call struct {
	*mock.Call
}

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

func (*File_Overwrite_Call) Return

func (*File_Overwrite_Call) Run

func (_c *File_Overwrite_Call) Run(run func(content string, forces ...bool)) *File_Overwrite_Call

func (*File_Overwrite_Call) RunAndReturn

func (_c *File_Overwrite_Call) RunAndReturn(run func(string, ...bool) modify.Apply) *File_Overwrite_Call

type File_Remove_Call

type File_Remove_Call struct {
	*mock.Call
}

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

func (*File_Remove_Call) Return

func (_c *File_Remove_Call) Return(_a0 modify.Apply) *File_Remove_Call

func (*File_Remove_Call) Run

func (_c *File_Remove_Call) Run(run func()) *File_Remove_Call

func (*File_Remove_Call) RunAndReturn

func (_c *File_Remove_Call) RunAndReturn(run func() modify.Apply) *File_Remove_Call

type GoFile

type GoFile struct {
	mock.Mock
}

GoFile is an autogenerated mock type for the GoFile type

func NewGoFile

func NewGoFile(t interface {
	mock.TestingT
	Cleanup(func())
}) *GoFile

NewGoFile creates a new instance of GoFile. 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 (*GoFile) Apply

func (_m *GoFile) Apply() error

Apply provides a mock function with no fields

func (*GoFile) EXPECT

func (_m *GoFile) EXPECT() *GoFile_Expecter

func (*GoFile) Find

func (_m *GoFile) Find(matchers []match.GoNode) modify.GoNode

Find provides a mock function with given fields: matchers

type GoFile_Apply_Call

type GoFile_Apply_Call struct {
	*mock.Call
}

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

func (*GoFile_Apply_Call) Return

func (_c *GoFile_Apply_Call) Return(_a0 error) *GoFile_Apply_Call

func (*GoFile_Apply_Call) Run

func (_c *GoFile_Apply_Call) Run(run func()) *GoFile_Apply_Call

func (*GoFile_Apply_Call) RunAndReturn

func (_c *GoFile_Apply_Call) RunAndReturn(run func() error) *GoFile_Apply_Call

type GoFile_Expecter

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

func (*GoFile_Expecter) Apply

func (_e *GoFile_Expecter) Apply() *GoFile_Apply_Call

Apply is a helper method to define mock.On call

func (*GoFile_Expecter) Find

func (_e *GoFile_Expecter) Find(matchers interface{}) *GoFile_Find_Call

Find is a helper method to define mock.On call

  • matchers []match.GoNode

type GoFile_Find_Call

type GoFile_Find_Call struct {
	*mock.Call
}

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

func (*GoFile_Find_Call) Return

func (*GoFile_Find_Call) Run

func (_c *GoFile_Find_Call) Run(run func(matchers []match.GoNode)) *GoFile_Find_Call

func (*GoFile_Find_Call) RunAndReturn

func (_c *GoFile_Find_Call) RunAndReturn(run func([]match.GoNode) modify.GoNode) *GoFile_Find_Call

type GoNode

type GoNode struct {
	mock.Mock
}

GoNode is an autogenerated mock type for the GoNode type

func NewGoNode

func NewGoNode(t interface {
	mock.TestingT
	Cleanup(func())
}) *GoNode

NewGoNode creates a new instance of GoNode. 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 (*GoNode) Apply

func (_m *GoNode) Apply(node dst.Node) error

Apply provides a mock function with given fields: node

func (*GoNode) EXPECT

func (_m *GoNode) EXPECT() *GoNode_Expecter

func (*GoNode) Modify

func (_m *GoNode) Modify(actions ...modify.Action) modify.GoFile

Modify provides a mock function with given fields: actions

type GoNode_Apply_Call

type GoNode_Apply_Call struct {
	*mock.Call
}

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

func (*GoNode_Apply_Call) Return

func (_c *GoNode_Apply_Call) Return(_a0 error) *GoNode_Apply_Call

func (*GoNode_Apply_Call) Run

func (_c *GoNode_Apply_Call) Run(run func(node dst.Node)) *GoNode_Apply_Call

func (*GoNode_Apply_Call) RunAndReturn

func (_c *GoNode_Apply_Call) RunAndReturn(run func(dst.Node) error) *GoNode_Apply_Call

type GoNode_Expecter

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

func (*GoNode_Expecter) Apply

func (_e *GoNode_Expecter) Apply(node interface{}) *GoNode_Apply_Call

Apply is a helper method to define mock.On call

  • node dst.Node

func (*GoNode_Expecter) Modify

func (_e *GoNode_Expecter) Modify(actions ...interface{}) *GoNode_Modify_Call

Modify is a helper method to define mock.On call

  • actions ...modify.Action

type GoNode_Modify_Call

type GoNode_Modify_Call struct {
	*mock.Call
}

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

func (*GoNode_Modify_Call) Return

func (*GoNode_Modify_Call) Run

func (_c *GoNode_Modify_Call) Run(run func(actions ...modify.Action)) *GoNode_Modify_Call

func (*GoNode_Modify_Call) RunAndReturn

func (_c *GoNode_Modify_Call) RunAndReturn(run func(...modify.Action) modify.GoFile) *GoNode_Modify_Call

Jump to

Keyboard shortcuts

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