mirror of
https://github.com/spf13/viper
synced 2024-12-22 11:37:02 +00:00
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
1 changed files with 2 additions and 6 deletions
8
viper.go
8
viper.go
|
@ -509,9 +509,7 @@ func AddConfigPath(in string) { v.AddConfigPath(in) }
|
||||||
|
|
||||||
func (v *Viper) AddConfigPath(in string) {
|
func (v *Viper) AddConfigPath(in string) {
|
||||||
if v.finder != nil {
|
if v.finder != nil {
|
||||||
v.logger.Warn("call to AddConfigPath is ineffective when a custom finder is configured")
|
v.logger.Warn("ineffective call to function: custom finder takes precedence", slog.String("function", "AddConfigPath"))
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if in != "" {
|
if in != "" {
|
||||||
|
@ -1964,9 +1962,7 @@ func SetConfigName(in string) { v.SetConfigName(in) }
|
||||||
|
|
||||||
func (v *Viper) SetConfigName(in string) {
|
func (v *Viper) SetConfigName(in string) {
|
||||||
if v.finder != nil {
|
if v.finder != nil {
|
||||||
v.logger.Warn("call to SetConfigName is ineffective when a custom finder is configured")
|
v.logger.Warn("ineffective call to function: custom finder takes precedence", slog.String("function", "SetConfigName"))
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if in != "" {
|
if in != "" {
|
||||||
|
|
Loading…
Reference in a new issue