mirror of https://github.com/spf13/viper.git
feat: do not return early from old search functions
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
3faea9d34c
commit
1be81c313a
8
viper.go
8
viper.go
|
@ -509,9 +509,7 @@ func AddConfigPath(in string) { v.AddConfigPath(in) }
|
|||
|
||||
func (v *Viper) AddConfigPath(in string) {
|
||||
if v.finder != nil {
|
||||
v.logger.Warn("call to AddConfigPath is ineffective when a custom finder is configured")
|
||||
|
||||
return
|
||||
v.logger.Warn("ineffective call to function: custom finder takes precedence", slog.String("function", "AddConfigPath"))
|
||||
}
|
||||
|
||||
if in != "" {
|
||||
|
@ -1964,9 +1962,7 @@ func SetConfigName(in string) { v.SetConfigName(in) }
|
|||
|
||||
func (v *Viper) SetConfigName(in string) {
|
||||
if v.finder != nil {
|
||||
v.logger.Warn("call to SetConfigName is ineffective when a custom finder is configured")
|
||||
|
||||
return
|
||||
v.logger.Warn("ineffective call to function: custom finder takes precedence", slog.String("function", "SetConfigName"))
|
||||
}
|
||||
|
||||
if in != "" {
|
||||
|
|
Loading…
Reference in New Issue