util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ByteOrder binary.ByteOrder

ByteOrder specifies how to convert byte sequences into 16-, 32-, or 64-bit unsigned integers.

Functions

func EnsureBufBigEnough

func EnsureBufBigEnough(buf []byte, needed int) []byte

EnsureBufBigEnough checks that given buffer is big enough to hold 'needed' bytes, otherwise returns a buffer of a size of at least 'needed' bytes.

func ReadInt

func ReadInt(r io.Reader) (int, error)

ReadInt reads an int (4 bytes) from the reader using ByteOrder.

func WriteInt

func WriteInt(w io.Writer, v int) error

WriteInt writes an int (4 bytes) to the given writer using ByteOrder.

Types

This section is empty.

Jump to

Keyboard shortcuts

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