cmdutils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pluralize added in v0.0.14

func Pluralize(count int, singular, plural string) string

func PrettyJSON

func PrettyJSON(w io.Writer, o interface{}) error

PrettyJSON is a convenience function to pretty print a JSON string using json.MarshalIndent.

func QueryJSON

func QueryJSON(o []interface{}, queryResult *QueryResult, queryStr string) error

QueryJson can query an unmarshalled json object with gojq.

Types

type QueryResult

type QueryResult struct {
	Result []interface{}
}

type TableWriter added in v0.1.0

type TableWriter interface {
	Write() error
}

func NewTableWriter added in v0.1.0

func NewTableWriter(headers []string, data [][]string, writer io.Writer) TableWriter

Jump to

Keyboard shortcuts

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