common

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(s kingpin.Settings) *constants.Format

Format is the CLI parser for output format flag

func GetReader

func GetReader(filename string) (io.ReadCloser, error)

GetReader returns the reader for the provided file or stdin if no filename was provided

func PrintCustomTableHeader

func PrintCustomTableHeader(w io.Writer, headers []string, split string)

PrintCustomTableHeader outputs headers using split as a separator

func PrintError

func PrintError(err error)

PrintError prints the red error message to stderr

func PrintHeader

func PrintHeader(val string)

PrintHeader formats the provided string as a header and prints it to stdout

func PrintTableHeader

func PrintTableHeader(w io.Writer, cols []string)

PrintTableHeader prints header of a table

func PrintTransferProgress

func PrintTransferProgress(current, target int64)

PrintTransferProgress is a helper function that prints incremental progress when we are pushing or pulling packages from remote repositories

func PrintWarn

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

PrintWarn outputs a warning message to stdout

func ProcessRunError

func ProcessRunError(runErr error) error

ProcessRunError looks at the error that happened during a CLI command execution and converts it to a user-friendly format

func ProgressReporter

func ProgressReporter(silent bool) pack.ProgressReporter

ProgressReporter returns new progress reporter either silent or verbose based on the settings

func ReadUserPass

func ReadUserPass() (string, string, error)

ReadUserPass reads a username and password from the console

Types

This section is empty.

Jump to

Keyboard shortcuts

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