Documentation ¶
Index ¶
- Constants
- Variables
- func Fatal(err interface{})
- func FlushStdoutBuffer() []byte
- func GetPipeReaders(pipes []Pipe) []*io.PipeReader
- func GetPipeWriters(pipes []Pipe) []*io.PipeWriter
- func GetStdout() io.Writer
- func MultiPipe(reader io.Reader, pws []*io.PipeWriter)
- func NewFilesChanFromReader(reader io.Reader, separator byte) *chan string
- func NewFilesChanFromSlice(values []string) *chan string
- func OpenFile(name string) *os.File
- func ScanBytes(b byte, requireEnd bool) bufio.SplitFunc
- func ScanLines(data []byte, atEOF bool) (advance int, token []byte, err error)
- func StdoutIsTTY() bool
- func ValidateFileName(name string)
- type Pipe
Constants ¶
const EndOfFiles string = ""
EndOfFiles marks the end of the list of files
Variables ¶
var LastError interface{}
LastError is the last error produced during tests
Functions ¶
func FlushStdoutBuffer ¶
func FlushStdoutBuffer() []byte
FlushStdoutBuffer flushes stdout for the environment's UI and returns its contents
func GetPipeReaders ¶
func GetPipeReaders(pipes []Pipe) []*io.PipeReader
GetPipeReaders maps pipes to their readers
func GetPipeWriters ¶
func GetPipeWriters(pipes []Pipe) []*io.PipeWriter
GetPipeWriters maps pipes to their writers
func MultiPipe ¶
func MultiPipe(reader io.Reader, pws []*io.PipeWriter)
MultiPipe copies a reader to multiple PipeWriters
func NewFilesChanFromReader ¶ added in v0.4.0
NewFilesChanFromReader creates a files chan from a reader, one name per line
func NewFilesChanFromSlice ¶ added in v0.4.0
NewFilesChanFromSlice creates a files chan from a string slice
func ScanLines ¶ added in v0.4.4
ScanLines scans by line, accepting \r, \n, or \r\n as the separator
func StdoutIsTTY ¶ added in v0.4.0
func StdoutIsTTY() bool
StdoutIsTTY returns true if stdout is a terminal, false otherwise
func ValidateFileName ¶ added in v0.4.0
func ValidateFileName(name string)
ValidateFileName checks whether the given string is a valid file name
Types ¶
type Pipe ¶
type Pipe struct { R *io.PipeReader W *io.PipeWriter }
Pipe groups a PipeReader and a PipeWriter