magnusbaeck / logstash-filter-verifier

Apache License 2.0
192 stars 27 forks source link

Small fixes #100

Closed breml closed 3 years ago

breml commented 3 years ago

@magnusbaeck I am not sure, if $HOME/.logstash-filter-verifier is a good choice for the config file. I took this from the examples of spf13/viper. Personally I think it would be better to use the directory from os.UserConfigDir and add the application name to it, like this:

configDir, err := os.UserHomeDir()
if err == nil {
    viper.AddConfigPath(path.Join(configDir, "logstash-filter-verifier"))
}

What do you think?

magnusbaeck commented 3 years ago

XDG_CONFIG_HOME and ~/.config seem pretty established by now so maybe go with that instead? LGTM otherwise.

breml commented 3 years ago

@magnusbaeck Changed the config dir according to our discussion.