Documentation
¶
Overview ¶
Package util provides generally helpful functions used by the ipgs system
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FatalIfErr ¶
FatalIfErr uses log.Fatalln to halt execution if err is not nil with the message "failed to [note]: [err]"
func GetBoolForPrompt ¶
GetBoolForPrompt writes a prompt to STDOUT and expects a "y" or a "n" in response. Returns true if "y" was entered, otherwise returns false.
func GetIntForPrompt ¶
GetIntForPromt writes a prompt to STDOUT and expects an integer in response. Returns the input converted to an integer if possible, or an error if not.
func GetStringForPrompt ¶
GetStringForPrompt writes a prompt to STDOUT and returns the string entered into STDIN. If the user does not enter anything, the default string is returned.
Types ¶
This section is empty.