cmd

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OutFormat []string

OutFormat an array of user supplied fields to determine columns displayed for formatted output

Functions

func ArrayContains

func ArrayContains(arr []string, target string) bool

ArrayContains returns true if []string contains the target string

func ArrayToMapNamesIntersection

func ArrayToMapNamesIntersection(reqFieldNames []string, resultMap map[string]interface{}) ([]string, error)

ArrayToMapNamesIntersection returns the intersection of two arrays

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func OPrintFormatted

func OPrintFormatted(reqFieldNames []string, jsonString string, printHeader bool) error

OPrintFormatted prints formatted header or formatted header+values of a json string based on json field names

func OPrintStruct

func OPrintStruct(reqFieldNames []string, strct interface{}, printHeader bool) error

OPrintStruct prints formatted header or formatted header+values of an arbitrary structure based on JSON field names

Types

This section is empty.

Jump to

Keyboard shortcuts

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