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

@@ -64,7 +64,7 @@ func getCustomServeFlags() []string {
result = append(result, "--"+configDirFlag)
result = append(result, configDir)
}
if configFile != defaultConfigName {
if configFile != "" {
result = append(result, "--"+configFileFlag)
result = append(result, configFile)
}