util

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logf

func Logf(format string, a ...interface{})

Logf prints to stdout if pref.Verbose is true.

func Logln

func Logln(a ...interface{})

Logln prints to stdout if pref.Verbose is true.

func NormalOrVerbose

func NormalOrVerbose(normal, verb string) string

NormalOrVerbose returns the normal string if Pref.Verbose is not true.

func ShortenPath

func ShortenPath(p string, max int) string

ShortenPath when necessary, tries to keep the last two segments intact.

func TermWidth

func TermWidth() (int, error)

TermWidth returns the terminal with.

Types

This section is empty.

Jump to

Keyboard shortcuts

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