9 // LoadFile loads configuration from the file given by configPath and
10 // decodes it into cfg.
12 // Currently, only JSON is supported. Support for YAML is anticipated.
13 func LoadFile(cfg interface{}, configPath string) error {
14 buf, err := ioutil.ReadFile(configPath)
18 err = json.Unmarshal(buf, cfg)
20 return fmt.Errorf("Error decoding config %q: %v", configPath, err)