waitout

package module
v0.0.0-...-ad2714f Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2015 License: BSD-3-Clause Imports: 2 Imported by: 10

README

Documentation

Overview

Package waitout makes it easy to wait for some output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Waiter

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

Waiter waits for the expected byte sequence, once.

func New

func New(expected []byte) *Waiter

New create a Waiter that will block on Wait until the expected bytes are written.

func (*Waiter) Wait

func (w *Waiter) Wait()

Wait will block until the expected bytes are written.

func (*Waiter) Write

func (w *Waiter) Write(p []byte) (int, error)

Write checks if the written data contains the expected bytes and unblocks Wait.

Jump to

Keyboard shortcuts

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