util

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Filler string = "_"

Filler is used to replace spaces in strings.

View Source
const Version string = "1.4.3"

Version is the application's version

Variables

View Source
var Debug = false

Debug defines if the application runs in debug mode.

View Source
var GlobalContext *cli.Context

GlobalContext holds a reference to the application context. It can be used for accessing flags.

Functions

func CheckError

func CheckError(err error, message string)

CheckError throws an exception if an error exists. If an error message exists, it is shown.

func CleanString

func CleanString(s string) string

CleanString removes whitespace in string.

func StringInArray

func StringInArray(item string, array []string) bool

StringInArray checks if a string is contained in an array.

func ThrowConfigError

func ThrowConfigError(config data.Config, message string)

ThrowConfigError prints the error, some information about a Config and exits the application.

func ThrowError

func ThrowError(message string)

ThrowError prints the error information and exits the application.

Types

This section is empty.

Jump to

Keyboard shortcuts

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