util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultErrorExitCode = 1
)

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

func DiffJSONs added in v0.1.9

func DiffJSONs(json1, json2 string)

DiffJSONs calculates the diff between two JSON strings and prints it in a pretty format.

func GetNewTabWriter

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

func HelpError

func HelpError(cmd *cobra.Command, args ...any) error

func HelpErrorf

func HelpErrorf(cmd *cobra.Command, format string, args ...any) error

func PrettyJSON added in v0.1.9

func PrettyJSON(data []byte) string

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 ...any) error

func Wrap

func Wrap(text string, lineWidth int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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