util

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = logrus.New()

Logger is the default logger with info level

Functions

func Command added in v0.0.2

func Command(cmd string) (*exec.Cmd, error)

Command return a Command struct from a full commad

func GetWithDefault added in v0.0.2

func GetWithDefault(m map[string]interface{}, key string, d interface{}) interface{}

GetWithDefault return default vaule if certain key does not exists

func HasKey added in v0.0.2

func HasKey(m map[string]interface{}, key string) bool

HasKey is a shortcut for checking if certain key exists in map

func RunCommand added in v0.0.2

func RunCommand(cmd string) error

RunCommand runs a commad and show all output in console, block current routine

func UseVerboseLog added in v0.0.2

func UseVerboseLog()

UseVerboseLog set logger level to debug

Types

This section is empty.

Jump to

Keyboard shortcuts

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