Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Conf map[string]interface{}
Conf is a global variable that will map a given string to an interface generated from the JSON file. It will be loaded with values on initial LoadConfig call.
Functions ¶
func GetVar ¶
GetVar will, given the name of a string, try to locate an environment variable that matches the string. If that match comes empty, then it will look in the configuration file for the string as a key. If that match comes up empty, the optional second parameter will be used as a default value. If it's not present, then the call will return an error. Otherwise, it will return the string of the interface{} stored in Conf or the default as appropriate
func LoadConfig ¶
LoadConfig will, given a filename, load a json file from the location. It will then decode it and store it into the global Conf variable
Types ¶
This section is empty.