helpers

package
v0.0.0-...-349589a Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 6 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvironmentVariableAsBool

func GetEnvironmentVariableAsBool(key string, fallback bool) bool

Get environment variable as a boolean

func GetEnvironmentVariableAsInteger

func GetEnvironmentVariableAsInteger(key string, fallback int) int

Get environment variable as an integer

func GetEnvironmentVariableAsString

func GetEnvironmentVariableAsString(key string, fallback string) string

Get environment variable as a string

func HoursToDuration

func HoursToDuration(hours time.Duration) time.Duration

Convert hours to duration

func MinutesToDuration

func MinutesToDuration(minutes time.Duration) time.Duration

Convert minutes to duration

func Plural

func Plural(count int, singular string) (result string)

func SecondsToDuration

func SecondsToDuration(seconds time.Duration) time.Duration

Convert seconds to duration

func SecondsToHuman

func SecondsToHuman(input int) (result string)

func StructureToString

func StructureToString(value interface{}) (string, error)

func ToLowerAndReplace

func ToLowerAndReplace(value string, replace string, with string) string

Convert string to lower case and replace given values

func ToLowerAndTrim

func ToLowerAndTrim(value string) string

Convert string to lower case and trim all whitespaces

Types

This section is empty.

Jump to

Keyboard shortcuts

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