Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support YAML/JSON configuration file #603

Closed
zhenghaoz opened this issue Dec 6, 2022 · 0 comments · Fixed by #604
Closed

Support YAML/JSON configuration file #603

zhenghaoz opened this issue Dec 6, 2022 · 0 comments · Fixed by #604
Labels
feature/minor Minor feature request help wanted Extra attention is needed

Comments

@zhenghaoz
Copy link
Collaborator

Gorse uses https://github.com/spf13/viper to load the configuration file, which supports YAML and JSON format as well:

gorse/config/config.go

Lines 550 to 555 in 492ffbb

// load config file
viper.SetConfigType("toml")
viper.SetConfigFile(path)
if err := viper.ReadInConfig(); err != nil {
return nil, errors.Trace(err)
}

@zhenghaoz zhenghaoz added help wanted Extra attention is needed feature/minor Minor feature request labels Dec 6, 2022
@zhenghaoz zhenghaoz linked a pull request Dec 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/minor Minor feature request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant