util

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultErrorExitCode = 1
)

Variables

View Source
var (
	ErrExit         = fmt.Errorf("exit")
	ErrNeedToLogin  = fmt.Errorf("need to login:\n\tUse:\tfing auth login")
	FatalErrHandler = fatal
)

Functions

func CheckErr

func CheckErr(err error)

func DefaultSubCommandRun

func DefaultSubCommandRun(out io.Writer) func(cmd *cobra.Command, args []string)

func FuzzyAgo

func FuzzyAgo(d time.Duration) string

FuzzyAgo returns humanized time ago

func FuzzyAgoAbbr

func FuzzyAgoAbbr(now time.Time, createdAt time.Time) string

Types

type ErrHandler

type ErrHandler func(string, int)

Jump to

Keyboard shortcuts

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