From bf60c73950f9035a7157148f89a297f4c9eeb8fa Mon Sep 17 00:00:00 2001 From: Guilherme Aleixo Date: Thu, 9 Jul 2026 08:54:01 -0300 Subject: [PATCH] fix: file lookup example var type missing --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f48ebb790..8b6a89899 100644 --- a/README.md +++ b/README.md @@ -123,9 +123,9 @@ if err != nil { You can handle the specific case where no config file is found. ```go -var fileLookupError viper.FileLookupError +var configFileErr viper.ConfigFileNotFoundError if err := viper.ReadInConfig(); err != nil { - if errors.As(err, &fileLookupError) { + if errors.As(err, &configFileErr) { // Indicates an explicitly set config file is not found (such as with // using `viper.SetConfigFile`) or that no config file was found in // any search path (such as when using `viper.AddConfigPath`)