buffer

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: MIT Imports: 1 Imported by: 0

README

buffer

go minimal buffer

Credit to Dave Cheney: http://dave.cheney.net/2015/06/05/friday-pop-quiz-the-smallest-buffer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer []byte

A Buffer is a variable-sized buffer of bytes with Read and Write methods. The zero value for Buffer is an empty buffer ready to use.

func (*Buffer) Read

func (b *Buffer) Read(p []byte) (int, error)

Read reads up to len(p) bytes into p from the Buffer.

func (*Buffer) Write

func (b *Buffer) Write(p []byte) (int, error)

Write writes len(p) bytes from p to the Buffer.

Jump to

Keyboard shortcuts

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