helpers

package
v0.0.0-...-d78993e Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorExit

func ErrorExit(msg interface{})

ErrorExit displays an error before exiting. Use this from a CLI command.

func JSON

func JSON(v interface{}) string

JSON will return the object as JSON.

func JSONLog

func JSONLog(v interface{})

JSONLog will log the object as JSON.

func JSONPrint

func JSONPrint(v interface{})

JSONPrint will print the object as JSON.

func Mustenv

func Mustenv(names ...string)

Mustenv ensures an environment variable is set and panics if it is not.

func StrToInt64

func StrToInt64(s string) int64

StrToInt64 converts string to int63

func StringInSlice

func StringInSlice(str string, slice []string) bool

StringInSlice return true if the string is found in the list.

func StringInStrings

func StringInStrings(str string, args ...string) bool

StringInStrings returns true if the string matches a string.

Types

type Message

type Message struct {
	// CLI result status
	Status string `json:"status,omitempty"`
}

Message CLI output status message

Jump to

Keyboard shortcuts

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