Accept a config file path instead of a config name

Config name is a Viper concept used for searching a specific file
in various paths with various extensions.

Making it configurable is usually not a useful feature
as users mostly want to define a full or relative path
to a config file.

This change replaces config name with config file.
This commit is contained in:
Márk Sági-Kazár
2020-12-03 16:23:33 +01:00
committed by GitHub
parent 3ff6b1bf64
commit 2a9ed0abca
6 changed files with 77 additions and 78 deletions

View File

@@ -124,7 +124,6 @@ Please take a look at the usage below to customize the serving parameters`,
}
service := service.Service{
ConfigDir: filepath.Clean(defaultConfigDir),
ConfigFile: defaultConfigName,
LogFilePath: portableLogFile,
LogMaxSize: defaultLogMaxSize,
LogMaxBackups: defaultLogMaxBackup,