utils

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForConfirmation

func AskForConfirmation() bool

func Date added in v0.17.0

func Date(dt time.Time) string

func HandleError

func HandleError(err error)

func ListContainsSubstr

func ListContainsSubstr(s []string, e string) bool

func Pretty

func Pretty(obj interface{})

func ReadInput

func ReadInput(file string) ([]byte, error)

ReadInput attempts to read a file from the location given, or if a location is not given, then it will attempt to read from stdin instead.

func ReadStdIn

func ReadStdIn() ([]byte, error)

func ResolveFormat

func ResolveFormat(cmd *cobra.Command) string

func SortOutputList

func SortOutputList(output [][]string, headerName string) [][]string

func Tmpl

func Tmpl(w io.Writer, text string, data interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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