Skip to content

Commit

Permalink
update %s to %w
Browse files Browse the repository at this point in the history
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/]
  • Loading branch information
XMLHexagram authored and sagikazarmark committed Jun 17, 2021
1 parent faa8ba0 commit 3fcad43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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))
}
```

Expand Down

0 comments on commit 3fcad43

Please sign in to comment.