reader

package
v0.0.0-...-44a5619 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package reader provides the reader of standard input.

Index

Constants

This section is empty.

Variables

Set provides an implementation and interface for Reader.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	ReadString(prompt string) (string, error)
	ReadPassword(prompt string) (string, error)
}

type MockInterface

type MockInterface struct {
	mock.Mock
}

MockInterface is an autogenerated mock type for the Interface type

func NewMockInterface

func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface

NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockInterface) EXPECT

func (_m *MockInterface) EXPECT() *MockInterface_Expecter

func (*MockInterface) ReadPassword

func (_m *MockInterface) ReadPassword(prompt string) (string, error)

ReadPassword provides a mock function with given fields: prompt

func (*MockInterface) ReadString

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

ReadString provides a mock function with given fields: prompt

type MockInterface_Expecter

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

func (*MockInterface_Expecter) ReadPassword

func (_e *MockInterface_Expecter) ReadPassword(prompt interface{}) *MockInterface_ReadPassword_Call

ReadPassword is a helper method to define mock.On call

  • prompt string

func (*MockInterface_Expecter) ReadString

func (_e *MockInterface_Expecter) ReadString(prompt interface{}) *MockInterface_ReadString_Call

ReadString is a helper method to define mock.On call

  • prompt string

type MockInterface_ReadPassword_Call

type MockInterface_ReadPassword_Call struct {
	*mock.Call
}

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

func (*MockInterface_ReadPassword_Call) Return

func (*MockInterface_ReadPassword_Call) Run

type MockInterface_ReadString_Call

type MockInterface_ReadString_Call struct {
	*mock.Call
}

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

func (*MockInterface_ReadString_Call) Return

func (*MockInterface_ReadString_Call) Run

type Reader

type Reader struct {
	Stdin stdio.Stdin
}

func (*Reader) ReadPassword

func (*Reader) ReadPassword(prompt string) (string, error)

ReadPassword reads a password from the stdin without echo back.

func (*Reader) ReadString

func (x *Reader) ReadString(prompt string) (string, error)

ReadString reads a string from the stdin.

Jump to

Keyboard shortcuts

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