util

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const RaceEnabled = false

RaceEnabled indicates that program/tests are running with race detection enabled or not. Some tests may chose to skip execution when race detection is on.

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