summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/viper/internal/encoding/yaml
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-04-25 23:50:10 +0200
committerGitHub <noreply@github.com>2022-04-25 23:50:10 +0200
commit67adad3e08fe17d5f7e87468ea47aa76e1662255 (patch)
tree91314fac90d39254e66ae794decfcd21c10a7b20 /vendor/github.com/spf13/viper/internal/encoding/yaml
parent2fca3c756373577eab4e0120ccce62eecc1f5ad8 (diff)
downloadmatterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.tar.gz
matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.tar.bz2
matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.zip
Update dependencies (#1813)
Diffstat (limited to 'vendor/github.com/spf13/viper/internal/encoding/yaml')
-rw-r--r--vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go8
-rw-r--r--vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go14
-rw-r--r--vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go14
3 files changed, 32 insertions, 4 deletions
diff --git a/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go b/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go
index f94b2699..24cc19df 100644
--- a/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go
+++ b/vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go
@@ -1,14 +1,14 @@
package yaml
-import "gopkg.in/yaml.v2"
+// import "gopkg.in/yaml.v2"
// Codec implements the encoding.Encoder and encoding.Decoder interfaces for YAML encoding.
type Codec struct{}
-func (Codec) Encode(v interface{}) ([]byte, error) {
+func (Codec) Encode(v map[string]interface{}) ([]byte, error) {
return yaml.Marshal(v)
}
-func (Codec) Decode(b []byte, v interface{}) error {
- return yaml.Unmarshal(b, v)
+func (Codec) Decode(b []byte, v map[string]interface{}) error {
+ return yaml.Unmarshal(b, &v)
}
diff --git a/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go b/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go
new file mode 100644
index 00000000..ca29b84d
--- /dev/null
+++ b/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml2.go
@@ -0,0 +1,14 @@
+//go:build !viper_yaml3
+// +build !viper_yaml3
+
+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,
+}
diff --git a/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go b/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go
new file mode 100644
index 00000000..96b8957f
--- /dev/null
+++ b/vendor/github.com/spf13/viper/internal/encoding/yaml/yaml3.go
@@ -0,0 +1,14 @@
+//go:build viper_yaml3
+// +build viper_yaml3
+
+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,
+}