mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
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/]
This commit is contained in:
parent
faa8ba0c53
commit
3fcad43618
1 changed files with 1 additions and 1 deletions
|
@ -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
|
viper.AddConfigPath(".") // optionally look for config in the working directory
|
||||||
err := viper.ReadInConfig() // Find and read the config file
|
err := viper.ReadInConfig() // Find and read the config file
|
||||||
if err != nil { // Handle errors reading 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))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue