utils

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanTemplate

func CleanTemplate(str string, data interface{}) (string, error)

CleanTemplate creates and runs template on passed string, with given params.

func ExtractMapKeys

func ExtractMapKeys(varMap interface{}) (data []string)

ExtractMapKeys returns top-level keys of map.

func FileExists

func FileExists(filename string) bool

FileExists returns a bool signifying if given file exists.

func OpenURL added in v0.16.2

func OpenURL(url string) error

OpenURL opens the specified URL in the default browser of the user. Attribution: https://stackoverflow.com/a/39324149

func RunCountdown

func RunCountdown(dur time.Duration, msg string)

RunCountdown runs countdown with a static message.

func SurveyOnInterrupt

func SurveyOnInterrupt(err error)

SurveyOnInterrupt is run on SIGINT.

Types

This section is empty.

Jump to

Keyboard shortcuts

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