prompter

package
v0.0.0-...-8ae6469 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliPrompter

type CliPrompter struct{}

CliPrompter used to prompt for cli input

func (*CliPrompter) Choose

func (cli *CliPrompter) Choose(msg string, options ...string) string

Choose given the choice return the option selected

func (*CliPrompter) ChooseWithDefault

func (cli *CliPrompter) ChooseWithDefault(msg string, defaultValue string, options ...string) (string, error)

ChooseWithDefault given the choice return the option selected with a default

func (*CliPrompter) Confirm

func (cli *CliPrompter) Confirm(msg string) bool

Confirm Ask the user if they confirm

func (*CliPrompter) Password

func (cli *CliPrompter) Password(msg string) string

Password prompt for password which is required

func (*CliPrompter) String

func (cli *CliPrompter) String(msg string, defaultValue string) string

StringRequired prompt for string which is required

func (*CliPrompter) StringRequired

func (cli *CliPrompter) StringRequired(msg string) string

StringRequired prompt for string which is required

type MockPrompter

type MockPrompter struct {
	mock.Mock
}

MockPrompter is an autogenerated mock type for the Prompter type

func (*MockPrompter) Choose

func (_m *MockPrompter) Choose(_a0 string, _a1 ...string) string

Choose provides a mock function with given fields: _a0, _a1

func (*MockPrompter) ChooseWithDefault

func (_m *MockPrompter) ChooseWithDefault(_a0 string, _a1 string, _a2 ...string) (string, error)

ChooseWithDefault provides a mock function with given fields: _a0, _a1, _a2

func (*MockPrompter) Confirm

func (_m *MockPrompter) Confirm(_a0 string) bool

Confirm provides a mock function with given fields: _a0

func (*MockPrompter) Password

func (_m *MockPrompter) Password(_a0 string) string

Password provides a mock function with given fields: _a0

func (*MockPrompter) String

func (_m *MockPrompter) String(_a0 string, _a1 string) string

String provides a mock function with given fields: _a0, _a1

func (*MockPrompter) StringRequired

func (_m *MockPrompter) StringRequired(_a0 string) string

StringRequired provides a mock function with given fields: _a0

type Prompter

type Prompter interface {
	ChooseWithDefault(string, string, ...string) (string, error)
	Choose(string, ...string) string
	Confirm(string) bool
	StringRequired(string) string
	String(string, string) string
	Password(string) string
}

Mock handles prompting user for input

Jump to

Keyboard shortcuts

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