mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 02:12:25 -05:00
[chore] bumps our spf13/viper version (#3943)
* bumps our spf13/viper version * fixes the one breaking change
This commit is contained in:
parent
1bf40e755c
commit
f46e490c30
147 changed files with 4637 additions and 18493 deletions
21
vendor/github.com/spf13/viper/README.md
generated
vendored
21
vendor/github.com/spf13/viper/README.md
generated
vendored
|
|
@ -3,7 +3,8 @@
|
|||
>
|
||||
> **Thank you!**
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
[](https://github.com/avelino/awesome-go#configuration)
|
||||
[](https://repl.it/@sagikazarmark/Viper-example#main.go)
|
||||
|
|
@ -11,7 +12,7 @@
|
|||
[](https://github.com/spf13/viper/actions?query=workflow%3ACI)
|
||||
[](https://gitter.im/spf13/viper?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://goreportcard.com/report/github.com/spf13/viper)
|
||||

|
||||

|
||||
[](https://pkg.go.dev/mod/github.com/spf13/viper)
|
||||
|
||||
**Go configuration with fangs!**
|
||||
|
|
@ -802,7 +803,7 @@ if err != nil {
|
|||
}
|
||||
```
|
||||
|
||||
Viper uses [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) under the hood for unmarshaling values which uses `mapstructure` tags by default.
|
||||
Viper uses [github.com/go-viper/mapstructure](https://github.com/go-viper/mapstructure) under the hood for unmarshaling values which uses `mapstructure` tags by default.
|
||||
|
||||
### Decoding custom formats
|
||||
|
||||
|
|
@ -836,13 +837,15 @@ func yamlStringSettings() string {
|
|||
|
||||
## Viper or Vipers?
|
||||
|
||||
Viper comes ready to use out of the box. There is no configuration or
|
||||
initialization needed to begin using Viper. Since most applications will want
|
||||
to use a single central repository for their configuration, the viper package
|
||||
provides this. It is similar to a singleton.
|
||||
Viper comes with a global instance (singleton) out of the box.
|
||||
|
||||
In all of the examples above, they demonstrate using viper in its singleton
|
||||
style approach.
|
||||
Although it makes setting up configuration easy,
|
||||
using it is generally discouraged as it makes testing harder and can lead to unexpected behavior.
|
||||
|
||||
The best practice is to initialize a Viper instance and pass that around when necessary.
|
||||
|
||||
The global instance _MAY_ be deprecated in the future.
|
||||
See [#1855](https://github.com/spf13/viper/issues/1855) for more details.
|
||||
|
||||
### Working with multiple vipers
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue