cmdx

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OsExit = os.Exit

OsExit is for unit-test hack

Functions

func Must

func Must(err error, message string, args ...interface{})

Must fatales with the optional message if err is not nil.

func Should

func Should(message string, err error)

Should checks the error and write the message in log in Error level

func ShouldWithCtx

func ShouldWithCtx(ctx context.Context, message string, err error)

ShouldWithCtx checks the error and write the message in log in Error level

func Version

func Version(tag, commit, buildTime *string) *cobra.Command

Version returns a *cobra.Command that handles the application version

Types

This section is empty.

Jump to

Keyboard shortcuts

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