cli

package
v1.8.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MPL-2.0 Imports: 6 Imported by: 2

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 ...any)

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 ...any)

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