From fc6240c1497097aa1f91dcf826ccd24fad44e9ad Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 25 Mar 2024 22:05:24 -0400 Subject: [PATCH] fix: use errors.As as viper uses a custom error struct --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 98a6b37..9685100 100644 --- a/config/config.go +++ b/config/config.go @@ -269,7 +269,7 @@ func newConfig() (*viper.Viper, error) { err := viper.ReadInConfig() if err != nil { - if !errors.Is(err, &viper.ConfigFileNotFoundError{}) { + if !errors.As(err, &viper.ConfigFileNotFoundError{}) { return nil, err }