helpers

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: MIT Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandBashStyleString added in v0.2.1

func ExpandBashStyleString(input string) (string, error)

ExpandBashStyleString expands variables ($TERM), replacing unknown ones with an empty string, and running any commands wrapped in "$()". If running a command fails, and error is returned instead.

func FormatSize

func FormatSize(size uint64) string

FormatSize formats a given size into K/M/G/T/P/E

func ReportError

func ReportError(data string)

ReportError is used by Widgets to report internal errors to the syslog

func TextOrCommand

func TextOrCommand(module string, payload map[string]interface{}) (string, error)

TextOrCommand interprets an input payload in order to determine whether it contains a static string, an command based on a string, or a command based on an array of arguments

func Titleize

func Titleize(input string) (titleized string)

Titleize ensure the provided string has uppercase initials

Types

This section is empty.

Jump to

Keyboard shortcuts

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