Package buffers provides tools for working with byte array, and byte slice buffers, for the Go programming language.
Go to file
Charles Iliya Krempeaux 95e0d19807 errors 2019-09-05 18:31:31 -07:00
LICENSE initial commit 2019-09-05 18:28:37 -07:00
README.md initial commit 2019-09-05 18:28:37 -07:00
doc.go docs 2019-09-05 18:31:11 -07:00
errors.go errors 2019-09-05 18:31:31 -07:00

README.md

go-buffers

Package buffers provides tools for working with byte array, and byte slice buffers.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-buffers

GoDoc

Example

import "github.com/reiver/go-buffers"

// ...

var buffer [1024]byte

var p []byte = buffer[:]

writer := buffers.NewWriter(p)

n, err := writer.Write(data)

switch casted := err.(type) {
case buffers.TooShort:
	//@TODO
default:
	return err
}