ui

package
v0.0.0-...-2337eca Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(a ...interface{}) (n int, err error)

Write content to default user interface, works like fmt.Print().

func Printf

func Printf(format string, a ...interface{}) (n int, err error)

Write content to default user interface, works like fmt.Printf().

func Read

func Read(p []byte) (n int, err error)

Read from default user interface.

func Write

func Write(p []byte) (n int, err error)

Write to default user interface.

func WriteString

func WriteString(s string) (n int, err error)

Write string to default user interface.

Types

type UI

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

UI represents command line user interface. It implements the UserInterface interface.

func Error

func Error() *UI

Get default error user interface.

func New

func New() *UI

Create a new UI instance.

func (*UI) Error

func (ui *UI) Error() *UI

Get an error user interface.

func (*UI) Print

func (ui *UI) Print(a ...interface{}) (n int, err error)

Write content to user interface, works like fmt.Print().

func (*UI) Printf

func (ui *UI) Printf(format string, a ...interface{}) (n int, err error)

Write content to user interface, works like fmt.Printf().

func (*UI) Read

func (ui *UI) Read(p []byte) (n int, err error)

Read from user interface.

func (*UI) Write

func (ui *UI) Write(p []byte) (n int, err error)

Write to user interface.

func (*UI) WriteString

func (ui *UI) WriteString(s string) (n int, err error)

Write string to user interface.

type UserInterface

type UserInterface interface {
	io.Writer
	io.Reader
}

Jump to

Keyboard shortcuts

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