Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checkout ¶
func Checkout(v interface{}) error
Checkout function takes a reference to a struct or a slice of string. It will traverse both data structures and look up key value pairs in the conf / viper struct by the name of the field for structs and string values for the slice. The function works with pointers so no value is returned. An error is returned if the wrong data structure is provided.
func GetEnv ¶
GetEnv() is a public function that retrieves values stored in conf. If it does not exist, an empty string (i.e., "") is returned. This function will be phased out in later versions of the package.
func LookupEnv ¶
LookupEnv is a public function, like GetEnv, designed to replace os.LookupEnv() in code-base. This function will most likely become a private function in later versions of the package.
func SetEnv ¶
SetEnv is a public function that adds key values into conf. This function should only be used either in this package itself or testing. Protect parameter is type *testing.T, and it's there to ensure developers knowingly use it in the appropriate circumstances. This function will most likely become a private function in later versions of the package.
Types ¶
This section is empty.