feat: do not return early from old search functions

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
Mark Sagi-Kazar 2024-06-04 13:32:27 +02:00 committed by Márk Sági-Kazár
parent 3faea9d34c
commit 1be81c313a

View file

@ -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 != "" {