Exemple #1
0
func LoadConfig(confName string) (*MergedConfig, error) {
	var err error
	for _, confPath := range ConfPaths {
		conf, err := config.ReadDefault(path.Join(confPath, confName))
		if err == nil {
			return &MergedConfig{conf, ""}, nil
		}
	}
	if err == nil {
		err = errors.New("not found")
	}
	return nil, err
}
Exemple #2
0
func parseMessagesFile(path string) (messageConfig *config.Config, error error) {
	messageConfig, error = config.ReadDefault(path)
	return
}