console

package
v0.0.0-...-9034458 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Echo

func Echo()

for a main package test: create a console, and echo all input

Types

type BufCon

type BufCon struct {
	util.BufferedOutput
	// contains filtered or unexported fields
}

func NewBufCon

func NewBufCon(strs []string) *BufCon

Creates a console whose input comes from the passed strings. when the strings are exhausted the Readln() returns false.

func (*BufCon) Readln

func (this *BufCon) Readln() (ret string, okay bool)

Returns the next input string, false when input has been exhausted.

type IConsole

type IConsole interface {
	Print(...interface{})
	Println(...interface{})
	Readln() (string, bool)
	Close()
}

func NewConsole

func NewConsole() IConsole

Creates a SimpleConsole

type SimpleConsole

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

implements IConsole

func (SimpleConsole) Close

func (c SimpleConsole) Close()

func (SimpleConsole) Print

func (c SimpleConsole) Print(args ...interface{})

func (SimpleConsole) Println

func (c SimpleConsole) Println(args ...interface{})

func (SimpleConsole) Readln

func (c SimpleConsole) Readln() (ret string, okay bool)

Jump to

Keyboard shortcuts

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