bottle

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bottle

type Bottle struct {
	ID       string
	Contents []byte
}

Bottle is a stores data from readers

func NewBottle

func NewBottle(id string) *Bottle

func (*Bottle) Drain

func (b *Bottle) Drain(w io.Writer) (err error)

Drain removes contents from the bottle into the Writer

func (*Bottle) Fill

func (b *Bottle) Fill(r io.Reader) (err error)

Fill puts the contents from the io.Reader into the bottle

func (*Bottle) Pour

func (b *Bottle) Pour(w io.Writer) (err error)

Pour copies the contents of the bottle into the Writer

type EmptyBottleError

type EmptyBottleError struct {
	Err error
}

func (EmptyBottleError) Error

func (e EmptyBottleError) Error() string

Jump to

Keyboard shortcuts

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