瀏覽代碼

Doc config Load

Brendan Abolivier 6 年之前
父節點
當前提交
24358cae4f
簽署人: Brendan Abolivier <contact@brendanabolivier.com> GPG 金鑰 ID: 8EF1500759F70623
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      src/config/config.go

+ 3
- 0
src/config/config.go 查看文件

@@ -46,6 +46,9 @@ type WebhookSettings struct {
46 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 52
 func Load(filename string) (cfg *Config, err error) {
50 53
 	rawCfg, err := ioutil.ReadFile(filename)
51 54
 	if err != nil {