util

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultErrorExitCode = 1
)

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

func GetNewTabWriter

func GetNewTabWriter(output io.Writer) *tabwriter.Writer

func HelpError

func HelpError(cmd *cobra.Command, args ...interface{}) error

func HelpErrorf

func HelpErrorf(cmd *cobra.Command, format string, args ...interface{}) error

func PrintTable

func PrintTable(header table.Row, rows []table.Row)

func StringToMapPointer added in v0.1.4

func StringToMapPointer(s string) map[string]*string

mapToMapPointer split string=string to a map[string]string

func UsageErrorf

func UsageErrorf(cmd *cobra.Command, format string, args ...interface{}) error

func Wrap

func Wrap(text string, lineWidth int) string

Types

type StringFlag

type StringFlag struct {
	// contains filtered or unexported fields
}

func (*StringFlag) Default

func (f *StringFlag) Default(value string)

func (StringFlag) Provided

func (f StringFlag) Provided() bool

func (*StringFlag) Set

func (f *StringFlag) Set(value string) error

func (StringFlag) String

func (f StringFlag) String() string

func (*StringFlag) Type

func (f *StringFlag) Type() string

func (StringFlag) Value

func (f StringFlag) Value() string

Jump to

Keyboard shortcuts

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