|
|
|
|
46
|
Secret string `yaml:"secret"`
|
46
|
Secret string `yaml:"secret"`
|
47
|
}
|
47
|
}
|
48
|
|
48
|
|
|
|
49
|
+// Load opens a given configuration file and parses it into an instance of the
|
|
|
50
|
+// Config structure.
|
|
|
51
|
+// Returns an error if there was an issue whith reading or parsing the file.
|
49
|
func Load(filename string) (cfg *Config, err error) {
|
52
|
func Load(filename string) (cfg *Config, err error) {
|
50
|
rawCfg, err := ioutil.ReadFile(filename)
|
53
|
rawCfg, err := ioutil.ReadFile(filename)
|
51
|
if err != nil {
|
54
|
if err != nil {
|