reader

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReader

func NewReader() *reader

NewReader creates a new Reader

Types

type MockReader

type MockReader struct {
	mock.Mock
}

MockReader is an autogenerated mock type for the Reader type

func NewMockReader

func NewMockReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReader

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

func (_m *MockReader) EXPECT() *MockReader_Expecter

func (*MockReader) ReadString

func (_m *MockReader) ReadString(prompt string) (string, error)

ReadString provides a mock function with given fields: prompt

type MockReader_Expecter

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

func (*MockReader_Expecter) ReadString

func (_e *MockReader_Expecter) ReadString(prompt interface{}) *MockReader_ReadString_Call

ReadString is a helper method to define mock.On call

  • prompt string

type MockReader_ReadString_Call

type MockReader_ReadString_Call struct {
	*mock.Call
}

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

func (*MockReader_ReadString_Call) Return

func (*MockReader_ReadString_Call) Run

func (*MockReader_ReadString_Call) RunAndReturn

type Reader

type Reader interface {
	// ReadString reads a string from stdin
	ReadString(prompt string) (string, error)
}

Jump to

Keyboard shortcuts

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