util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

ConfigDir returns the config directory for glooctl

func HomeDir

func HomeDir() string

HomeDir returns the current users home directory irrespecitve of the OS

func Print

func Print(output, template string, m proto.Message, tblPrn Printer, w io.Writer) error

Print - prints the given proto.Message to io.Writer using the specified output format

func PrintJSON

func PrintJSON(m proto.Message, w io.Writer) error

PrintJSON - prints the given proto.Message to io.Writer in JSON

func PrintJSONList

func PrintJSONList(data interface{}, w io.Writer) error

PrintJSONList - prints the given list to io.Writer in JSON

func PrintList

func PrintList(output, template string, list interface{}, tblPrn Printer, w io.Writer) error

PrintList - prints the given list of values to io.Writer using the specified output format

func PrintTemplate

func PrintTemplate(data interface{}, tmpl string, w io.Writer) error

PrintTemplate prints the give value using the provided Go template to io.Writer

func PrintYAML

func PrintYAML(m proto.Message, w io.Writer) error

PrintYAML - prints the given proto.Message to io.Writer in YAML

func PrintYAMLList

func PrintYAMLList(data interface{}, w io.Writer) error

PrintYAMLList - prints the given list to io.Writer in YAML

func ReadStdinInto

func ReadStdinInto(v proto.Message) error

ReadStdinInto reads the standard input into the provided proto.Message

func Telemetry

func Telemetry(version string, t time.Time)

Telemetry sends telemetry information about glooctl to Checkpoint server

Types

type Printer

type Printer func(interface{}, io.Writer) error

Printer represents a function that prints a value to io.Writer, usually using a table

Jump to

Keyboard shortcuts

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