cli

package
v0.0.0-...-ff3c499 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFlags

func InitFlags()

InitFlags - initiall cli flags.

func PrettyPrintErrorObj

func PrettyPrintErrorObj(errObj api.VTMError)

PrettyPrintErrorObj - Pretty prints the error object

func PrettyPrintMany

func PrettyPrintMany(headers []string, rows []map[string]interface{})

PrettyPrintMany - Pretty prints maps as tables

func PrettyPrintSingle

func PrettyPrintSingle(row map[string]interface{})

PrettyPrintSingle - Pretty prints map as tables

func RegisterCliCommand

func RegisterCliCommand(name string, flagSet *flag.FlagSet, exec ExecFunc)

RegisterCliCommand - allows additional cli commands to be registered.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command struct - defines a cli command with flags and exec

type ExecFunc

type ExecFunc func(client *api.Client, flagSet *flag.FlagSet)

ExecFunc executes the function for cli.

Jump to

Keyboard shortcuts

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