utils

package
v2.2.0-dev.127+incompa... Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: Apache-2.0, BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeStringToJson

func EscapeStringToJson(input string) string

func LogErrorAndExit

func LogErrorAndExit(err error)

func LogErrorMessage

func LogErrorMessage(message string)

func LogErrorMessageAndExit

func LogErrorMessageAndExit(message string)

func LogMissingParameterAndExit

func LogMissingParameterAndExit(c *cli.Context, missingFlags []string, message ...string)

func LogMissingParameterMessageAndExit

func LogMissingParameterMessageAndExit(c *cli.Context, message string)

func Println

func Println(a ...interface{}) (n int, err error)

func ReadContentFromURL

func ReadContentFromURL(urlLocation string, client *http.Client) []byte

func ReadFile

func ReadFile(fileLocation string) []byte

func SafeInt32Convert

func SafeInt32Convert(value *int32) int32

func SafeStringConvert

func SafeStringConvert(value *string) string

func TimeTrack

func TimeTrack(start time.Time, name string)

Types

type CBFormatter

type CBFormatter struct {
}

func (*CBFormatter) Format

func (f *CBFormatter) Format(entry *log.Entry) ([]byte, error)

type Output

type Output struct {
	Format string
}

func (*Output) Write

func (o *Output) Write(header []string, row Row)

func (*Output) WriteList

func (o *Output) WriteList(header []string, tableRows []Row)

type RESTError

type RESTError struct {
	Response interface{}
	Code     int
}

func (*RESTError) Error

func (e *RESTError) Error() string

type Row

type Row interface {
	DataAsStringArray() []string
}

Jump to

Keyboard shortcuts

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