msg

package
v0.0.0-...-f715ac0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package msg provides some tools for printing nice messages to the terminal.

The location of the call is automatically prepended with all the calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(m string, verbose int)

Debug messages.

func DurationToSeconds

func DurationToSeconds(dur string) (int64, error)

DurationToSeconds converts a human-readable duration to the number of seconds. A "duration" is simply a number with a suffix. Accepted suffixes are:

no suffix: seconds
s: seconds
m: minutes
h: hours
d: days
w: weeks
M: months (a month is 30.5 days)
y: years (a year is always 365 days)

func Fatal

func Fatal(err error)

Fatal prints the error and exits if it's non-nil.

func Info

func Info(m string, verbose int)

Info for informational messages.

func Infoc

func Infoc(m, color string, verbose int)

Infoc are informational messages in colour.

func Warn

func Warn(err error)

Warn if err is non-nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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