Documentation ¶
Overview ¶
Package zeusutils provides utilities for use in zeus commands that are implemented in Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadArg ¶
LoadArg attempts to load the named zeus argument from os.Args. Args are passed to zeus commands in the name=value format on the commandline. Zeus will throw an error if not all required args are provided to your command, so this util does not validate the presence of args, but only loads the value. In addition, leading and trailing whitespace will be trimmed.
func LoadArgs ¶ added in v0.9.14
LoadArgs loads all zeus arguments into a map, with the argument label as keys.
func Prompt ¶ added in v0.9.14
Prompt asks the user to provide input for the value with the given name, and returns the raw value to the caller.
func RequireEnv ¶
RequireEnv attempts to load the value of the named environment variable If no value for the given name has been found, the program will fatal.
func TrimStringLiterals ¶ added in v0.9.14
TrimStringLiterals will remove string literals, if the provided string starts AND ends with a literal. Eg: "value" => value 'value' => value "value => "value
Types ¶
This section is empty.