reader

package
v0.0.0-...-ba1c585 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package reader provides an object that reads queries from various input sources (e.g. stdin, pipe).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

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

func NewInteractive

func NewInteractive() *T

NewInteractive returns a T that prompts the user for input.

func NewNonInteractive

func NewNonInteractive() *T

NewNonInteractive returns a T that simply reads input from stdin. Useful for when the user is piping input from a file or another program.

func (*T) Close

func (t *T) Close()

Close frees any resources acquired by this reader.

func (*T) GetQuery

func (t *T) GetQuery() (string, error)

GetQuery returns an entire query where queries are delimited by semicolons. GetQuery returns the error io.EOF when there is no more input.

func (*T) GetQueryWithTerminator

func (t *T) GetQueryWithTerminator(terminator rune) (string, error)

Jump to

Keyboard shortcuts

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