mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 02:52:26 -05:00
[chore]: Bump github.com/spf13/viper from 1.14.0 to 1.15.0 (#1375)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.14.0 to 1.15.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.14.0...v1.15.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
3e4dc6bff3
commit
98a09b5633
53 changed files with 218 additions and 6032 deletions
5
vendor/github.com/spf13/afero/memmap.go
generated
vendored
5
vendor/github.com/spf13/afero/memmap.go
generated
vendored
|
|
@ -142,6 +142,11 @@ func (m *MemMapFs) Mkdir(name string, perm os.FileMode) error {
|
|||
}
|
||||
|
||||
m.mu.Lock()
|
||||
// Dobule check that it doesn't exist.
|
||||
if _, ok := m.getData()[name]; ok {
|
||||
m.mu.Unlock()
|
||||
return &os.PathError{Op: "mkdir", Path: name, Err: ErrFileExists}
|
||||
}
|
||||
item := mem.CreateDir(name)
|
||||
mem.SetMode(item, os.ModeDir|perm)
|
||||
m.getData()[name] = item
|
||||
|
|
|
|||
2
vendor/github.com/spf13/viper/Makefile
generated
vendored
2
vendor/github.com/spf13/viper/Makefile
generated
vendored
|
|
@ -16,7 +16,7 @@ endif
|
|||
|
||||
# Dependency versions
|
||||
GOTESTSUM_VERSION = 1.8.0
|
||||
GOLANGCI_VERSION = 1.49.0
|
||||
GOLANGCI_VERSION = 1.50.1
|
||||
|
||||
# Add the ability to override some variables
|
||||
# Use with care
|
||||
|
|
|
|||
6
vendor/github.com/spf13/viper/README.md
generated
vendored
6
vendor/github.com/spf13/viper/README.md
generated
vendored
|
|
@ -8,7 +8,7 @@
|
|||
[](https://github.com/avelino/awesome-go#configuration)
|
||||
[](https://repl.it/@sagikazarmark/Viper-example#main.go)
|
||||
|
||||
[](https://github.com/spf13/viper/actions?query=workflow%3ACI)
|
||||
[](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)
|
||||

|
||||
|
|
@ -40,8 +40,8 @@ go get github.com/spf13/viper
|
|||
|
||||
## What is Viper?
|
||||
|
||||
Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed
|
||||
to work within an application, and can handle all types of configuration needs
|
||||
Viper is a complete configuration solution for Go applications including [12-Factor apps](https://12factor.net/#the_twelve_factors).
|
||||
It is designed to work within an application, and can handle all types of configuration needs
|
||||
and formats. It supports:
|
||||
|
||||
* setting defaults
|
||||
|
|
|
|||
29
vendor/github.com/spf13/viper/internal/encoding/toml/codec.go
generated
vendored
29
vendor/github.com/spf13/viper/internal/encoding/toml/codec.go
generated
vendored
|
|
@ -1,39 +1,16 @@
|
|||
//go:build viper_toml1
|
||||
// +build viper_toml1
|
||||
|
||||
package toml
|
||||
|
||||
import (
|
||||
"github.com/pelletier/go-toml"
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
)
|
||||
|
||||
// Codec implements the encoding.Encoder and encoding.Decoder interfaces for TOML encoding.
|
||||
type Codec struct{}
|
||||
|
||||
func (Codec) Encode(v map[string]interface{}) ([]byte, error) {
|
||||
t, err := toml.TreeFromMap(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s, err := t.ToTomlString()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return []byte(s), nil
|
||||
return toml.Marshal(v)
|
||||
}
|
||||
|
||||
func (Codec) Decode(b []byte, v map[string]interface{}) error {
|
||||
tree, err := toml.LoadBytes(b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tmap := tree.ToMap()
|
||||
for key, value := range tmap {
|
||||
v[key] = value
|
||||
}
|
||||
|
||||
return nil
|
||||
return toml.Unmarshal(b, &v)
|
||||
}
|
||||
|
|
|
|||
19
vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go
generated
vendored
19
vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go
generated
vendored
|
|
@ -1,19 +0,0 @@
|
|||
//go:build !viper_toml1
|
||||
// +build !viper_toml1
|
||||
|
||||
package toml
|
||||
|
||||
import (
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
)
|
||||
|
||||
// Codec implements the encoding.Encoder and encoding.Decoder interfaces for TOML encoding.
|
||||
type Codec struct{}
|
||||
|
||||
func (Codec) Encode(v map[string]interface{}) ([]byte, error) {
|
||||
return toml.Marshal(v)
|
||||
}
|
||||
|
||||
func (Codec) Decode(b []byte, v map[string]interface{}) error {
|
||||
return toml.Unmarshal(b, &v)
|
||||
}
|
||||
2
vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go
generated
vendored
2
vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
package yaml
|
||||
|
||||
// import "gopkg.in/yaml.v2"
|
||||
import "gopkg.in/yaml.v3"
|
||||
|
||||
// Codec implements the encoding.Encoder and encoding.Decoder interfaces for YAML encoding.
|
||||
type Codec struct{}
|
||||
|
|
|
|||
14
vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go
generated
vendored
14
vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go
generated
vendored
|
|
@ -1,14 +0,0 @@
|
|||
//go:build viper_yaml2
|
||||
// +build viper_yaml2
|
||||
|
||||
package yaml
|
||||
|
||||
import yamlv2 "gopkg.in/yaml.v2"
|
||||
|
||||
var yaml = struct {
|
||||
Marshal func(in interface{}) (out []byte, err error)
|
||||
Unmarshal func(in []byte, out interface{}) (err error)
|
||||
}{
|
||||
Marshal: yamlv2.Marshal,
|
||||
Unmarshal: yamlv2.Unmarshal,
|
||||
}
|
||||
14
vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go
generated
vendored
14
vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go
generated
vendored
|
|
@ -1,14 +0,0 @@
|
|||
//go:build !viper_yaml2
|
||||
// +build !viper_yaml2
|
||||
|
||||
package yaml
|
||||
|
||||
import yamlv3 "gopkg.in/yaml.v3"
|
||||
|
||||
var yaml = struct {
|
||||
Marshal func(in interface{}) (out []byte, err error)
|
||||
Unmarshal func(in []byte, out interface{}) (err error)
|
||||
}{
|
||||
Marshal: yamlv3.Marshal,
|
||||
Unmarshal: yamlv3.Unmarshal,
|
||||
}
|
||||
5
vendor/github.com/spf13/viper/viper.go
generated
vendored
5
vendor/github.com/spf13/viper/viper.go
generated
vendored
|
|
@ -421,13 +421,18 @@ var SupportedExts = []string{"json", "toml", "yaml", "yml", "properties", "props
|
|||
// SupportedRemoteProviders are universally supported remote providers.
|
||||
var SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore"}
|
||||
|
||||
// OnConfigChange sets the event handler that is called when a config file changes.
|
||||
func OnConfigChange(run func(in fsnotify.Event)) { v.OnConfigChange(run) }
|
||||
|
||||
// OnConfigChange sets the event handler that is called when a config file changes.
|
||||
func (v *Viper) OnConfigChange(run func(in fsnotify.Event)) {
|
||||
v.onConfigChange = run
|
||||
}
|
||||
|
||||
// WatchConfig starts watching a config file for changes.
|
||||
func WatchConfig() { v.WatchConfig() }
|
||||
|
||||
// WatchConfig starts watching a config file for changes.
|
||||
func (v *Viper) WatchConfig() {
|
||||
initWG := sync.WaitGroup{}
|
||||
initWG.Add(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue