cli

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package cli holds generic CLI utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagError

type FlagError struct {
	Flag    string
	Message string
}

FlagError implements error to provide good diagnostic messages when CLI flags are used improperly.

func ErrInvalidValue

func ErrInvalidValue(f string, format string, values ...interface{}) *FlagError

ErrInvalidValue creates an error indicating a flag received a bad value.

func ErrMissingFlag

func ErrMissingFlag(f string) *FlagError

ErrMissingFlag creates an error indicating a required flag is missing.

func (*FlagError) Error

func (fe *FlagError) Error() string

Error implements error

Jump to

Keyboard shortcuts

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