util

package
v0.0.13-a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEBUG = false

Functions

func Check

func Check(err error)

func Checks

func Checks(errs ...error)

func Debug

func Debug(format string, vals ...interface{})

func Die

func Die(c *cli.Context, msg string)

func Error

func Error(err ...error)

func Errorf

func Errorf(format string, vals ...interface{}) error

func Fatal

func Fatal(format string, vals ...interface{})

func Info

func Info(format string, vals ...interface{})

func NWork

func NWork(fn func(), p int) *sync.WaitGroup

NWork runs fn() with parallelism p

func Printf

func Printf(format string, vals ...interface{})

func Println

func Println(s string)

func Slug

func Slug(s string) string

func SlugBase

func SlugBase(path string) (slug string)

Slugs the basename of the path, removing the path and extension "/path/to/file_2.gz " -> "file-2"

func Slugged

func Slugged(s, delim string) string

func Sprintf

func Sprintf(format string, vals ...interface{}) string

func Version

func Version() string

func WaitGroup

func WaitGroup(i int) *sync.WaitGroup

func Warn

func Warn(err error, extra string)

func Work

func Work(fn func()) *sync.WaitGroup

Work runs fn() with default parallelism

Types

This section is empty.

Jump to

Keyboard shortcuts

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