cli

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cli provides utilities for CLI tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatalf

func Fatalf(message string, args ...interface{})

Fatalf prints formatted message to stderr and aborts execution.

func Should

func Should(err error)

Should panics if err != nil

Should is useful when error should never happen in customer environment, it can only be development error.

func Warning

func Warning(message string, args ...interface{})

Warning prints formatted message to stderr.

func WithContext

func WithContext(ctx context.Context, f func(context.Context) error) error

WithContext wraps function call to provide a context cancellable with ^C.

Types

This section is empty.

Jump to

Keyboard shortcuts

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