From 9092420ad109438c54c64ed2970df04117d294da Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Tue, 21 Jan 2025 22:17:03 +0530 Subject: [PATCH] feat: minor refactor Signed-off-by: Manan Gupta --- go/viperutil/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/viperutil/config.go b/go/viperutil/config.go index 467a94f7d0a..33cc112b4af 100644 --- a/go/viperutil/config.go +++ b/go/viperutil/config.go @@ -189,7 +189,7 @@ func LoadConfig() (context.CancelFunc, error) { // isConfigFileNotFoundError checks if the error is caused because the file wasn't found. func isConfigFileNotFoundError(err error) bool { - if _, ok := err.(viper.ConfigFileNotFoundError); ok { + if errors.As(err, &viper.ConfigFileNotFoundError{}) { return true } return errors.Is(err, os.ErrNotExist)