console

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

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

Console

func NewConsole

func NewConsole(w io.Writer, r io.Reader) *Console

NewConsole creates a new console

func (*Console) Debug

func (c *Console) Debug(msg ...interface{})

Debug prints a debug message

func (*Console) Error

func (c *Console) Error(msg ...interface{})

Error prints an error message

func (*Console) Info

func (c *Console) Info(msg ...interface{})

Info prints a info message

func (*Console) Print

func (c *Console) Print(msg ...interface{})

Print

func (*Console) PrintTable

func (c *Console) PrintTable(content [][]string) error

PrintTable prints a table

func (*Console) Read

func (c *Console) Read() string

Read read a line from console reader

func (*Console) ReadPassword

func (c *Console) ReadPassword(prompt string) (string, error)

func (*Console) Warn

func (c *Console) Warn(msg ...interface{})

Warn prints a warning message

func (*Console) Write

func (c *Console) Write(data []byte) (int, error)

Write

type MockConsole

type MockConsole struct {
	mock.Mock
}

func NewMockConsole

func NewMockConsole() *MockConsole

NewMockConsole returns a new mock console

func (*MockConsole) Debug

func (c *MockConsole) Debug(msg ...interface{})

Debug prints a debug message

func (*MockConsole) Error

func (c *MockConsole) Error(msg ...interface{})

Error prints an error message

func (*MockConsole) Info

func (c *MockConsole) Info(msg ...interface{})

Info prints a info message

func (*MockConsole) PrintTable

func (c *MockConsole) PrintTable(table [][]string) error

PrintTable is a mock implementation of the PrintTable method

func (*MockConsole) Read

func (c *MockConsole) Read() string

Read read a line from console reader

func (*MockConsole) ReadPassword

func (c *MockConsole) ReadPassword(prompt string) (string, error)

ReadPassword read password from console reader

func (*MockConsole) Warn

func (c *MockConsole) Warn(msg ...interface{})

Warn prints a warning message

func (*MockConsole) Write

func (c *MockConsole) Write(data []byte) (int, error)

Write is a mock implementation of the Write method

Jump to

Keyboard shortcuts

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