util

package
v0.2.5 Latest Latest
Warning

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

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

Documentation

Overview

Package util provides util functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFileExist

func IsFileExist(fileName string) bool

IsFileExist test whether a filepath is exist.

func Must added in v0.1.9

func Must(t *testing.T, v bool)

Must asserts the given value is True for testing.

func ToFixed

func ToFixed(n float64, prec int) string

ToFixed truncates float64 type to a particular percision in string.

Types

type Timer added in v0.1.4

type Timer struct {
	// contains filtered or unexported fields
}

Timer is a minimal timer util.

func NewTimer added in v0.1.4

func NewTimer() *Timer

NewTimer creates a minimal timer.

func (*Timer) Elapsed added in v0.1.4

func (t *Timer) Elapsed() float64

Elapsed returns milliseconds elapsed.

Directories

Path Synopsis
Package idpool implements a reusable integer id pool.
Package idpool implements a reusable integer id pool.
Package log implements leveled logging.
Package log implements leveled logging.
Package safemap implements a map like container with rw lock to keep groutine safety.
Package safemap implements a map like container with rw lock to keep groutine safety.
Package trie implements a in-memory trie tree.
Package trie implements a in-memory trie tree.

Jump to

Keyboard shortcuts

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