Documentation ¶
Index ¶
- type FakeIO
- func (f *FakeIO) Input() io.Reader
- func (f *FakeIO) IsInputPiped() bool
- func (f *FakeIO) IsOutputPiped() bool
- func (f *FakeIO) Output() io.Writer
- func (f *FakeIO) Prompts() (io.Reader, io.Writer, error)
- func (f *FakeIO) ReadSecret() ([]byte, error)
- func (f *FakeIO) ReadStdout() ([]byte, error)
- func (f *FakeIO) Stdin() *os.File
- func (f *FakeIO) Stdout() *os.File
- type FakeReader
- type FakeWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeIO ¶
type FakeIO struct { In *FakeReader Out *FakeWriter StdIn *os.File StdOut *os.File PromptIn *FakeReader PromptOut *FakeWriter PasswordReader *FakeReader PromptErr error }
FakeIO is a helper type for testing that implements the ui.IO interface
func (*FakeIO) IsInputPiped ¶
func (*FakeIO) IsOutputPiped ¶
func (*FakeIO) ReadSecret ¶
func (*FakeIO) ReadStdout ¶
type FakeReader ¶
type FakeReader struct { *bytes.Buffer Piped bool Reads []string ReadErr error // contains filtered or unexported fields }
FakeReader implements the Reader interface.
type FakeWriter ¶
FakeWriter implements the Writer interface.
Click to show internal directories.
Click to hide internal directories.