misc

package module
v0.0.0-...-6c55d4a Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package misc contains Go utilities that I don't have a good place to put, that I need elsewhere, and that aren't in the standard library.

Index

Constants

View Source
const MaxIntValue = int(^uint(0) >> 1)

MaxIntValue is the maximum value of an int.

Variables

This section is empty.

Functions

func Grow

func Grow(buf []byte, n int) []byte

Grow(buf, n) returns a slice of length at least n. It allocates if and only if cap(buf) < n. Otherwise it returns buf or re-slices buf.

func RemoveAll

func RemoveAll(dir string)

RemoveAll removes dir and any children of dir. It panics if an error is encountered.

func TempDir

func TempDir(prefix string) string

TempDir creates and returns a temporary directory with the given prefix. It panics if an error is encountered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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