chore: clean up linting configuration (#1343)

This commit is contained in:
Christopher Angelo Phillips
2022-11-16 16:28:09 +00:00
committed by GitHub
parent f8be64d312
commit 0774ad15e2
31 changed files with 67 additions and 50 deletions
+5 -3
View File
@@ -75,9 +75,11 @@ func (cfg *Application) LoadAllValues(v *viper.Viper, configPath string) error {
// check if user specified config; otherwise read all possible paths
if err := loadConfig(v, configPath); err != nil {
if _, ok := err.(viper.ConfigFileNotFoundError); ok {
// Not Found; ignore this error
log.Debug("no config file found; proceeding with defaults")
var notFound *viper.ConfigFileNotFoundError
if errors.As(err, &notFound) {
log.Debugf("no config file found, using defaults")
} else {
return fmt.Errorf("unable to load config: %w", err)
}
}