reader

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 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 Reader

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

Reader - Input. This struct provides methods for reading strings and numbers from standard input, file input, URLs, and sockets.

func NewIn

func NewIn(name string) (Reader, error)

NewIn initializes an input from STDIN, file or web page.

name - the filename or web page name, reads from STDIN if name is empty. Panics on errors.

func NewInFromString

func NewInFromString(input string) Reader

NewInFromString initializes an input from string.

func (*Reader) Close

func (in *Reader) Close()

Close ...

func (*Reader) LinesFromReader

func (in *Reader) LinesFromReader() ([]string, error)

LinesFromReader provides slice of text lines from input.

func (*Reader) ReadAllStrings

func (in *Reader) ReadAllStrings() ([]string, error)

ReadAllStrings provides slice of strings from input split by white space.

func (*Reader) ReadString

func (in *Reader) ReadString() (string, error)

ReadString ...

Jump to

Keyboard shortcuts

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