clis

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortOn

func AbortOn(errCase string, e error)

AbortOn will quit on the anticipated error gracefully without stack trace

func Abs

func Abs(x int) int

Abs returns the absolute value of x.

func Basename

func Basename(s string) string

Basename returns the file name without extension.

func IsExist

func IsExist(fileName string) bool

IsExist checks if the given file exist

func Setup

func Setup(p string, v int)

func Verbose

func Verbose(levelSet int, format string, args ...interface{})

Verbose will print info to stderr according to the verbose level setting

func WarnOn

func WarnOn(errCase string, e error) bool

WarnOn will print the error message as a Warning, if applicable, and retur true if so. For a suggested format of "ActionName, step name", the output would be

[progname] Warning: ActionName, step name, sql: Rows are closed

func Warning

func Warning(m string)

Warning will print the given string as a Warning

Types

type OptsT

type OptsT struct {
	Verbose int
}

The OptsT type defines all the configurable options from cli.

var (
	Opts OptsT
)

Jump to

Keyboard shortcuts

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