top
(README.md)
README
======

Buffered reader for Golang.

Usage
-----

Example:

    import "github.com/vmihailenco/bufreader"

    func createReader() (*bufreader.Reader, error) {
        return bufreader.NewSizedReader(1024), nil
    }

    pool = bufreader.NewReaderPool(100, createReader)
    rd, err := pool.Get()
    if err != nil {
        panic(err)
    }
    defer pool.Add(rd)

    _, err := rd.ReadFrom(conn)
    if err != nil {
        panic(err)
    }

    fmt.Printf("Read: %q.", rd.Bytes())

Imports 1 package(s) ΒΆ

  1. launchpad.net/gocheck