From 3fcad43618b4672db5aa47f0367c5158e8eb872b Mon Sep 17 00:00:00 2001 From: lmx-Hexagram <52130356+lmx-Hexagram@users.noreply.github.com> Date: Wed, 7 Apr 2021 09:35:18 +0800 Subject: [PATCH] update %s to %w I apologize for my rude pr on modify readme I think it is better to use %w in fmt.Errorf instead of %s (see go doc)[https://golang.org/pkg/errors/] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 82bff12..f409b15 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ viper.AddConfigPath("$HOME/.appname") // call multiple times to add many search viper.AddConfigPath(".") // optionally look for config in the working directory err := viper.ReadInConfig() // Find and read the config file if err != nil { // Handle errors reading the config file - panic(fmt.Errorf("Fatal error config file: %s \n", err)) + panic(fmt.Errorf("Fatal error config file: %w \n", err)) } ```