diff options
| author | 2022-05-02 14:05:18 +0100 | |
|---|---|---|
| committer | 2022-05-02 15:05:18 +0200 | |
| commit | b56dae8120d43b9acd3d3ed4d40100ffab7b972a (patch) | |
| tree | d55d30589d8a8499ed3d5eecba163abc9fa78c27 /vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go | |
| parent | add extra indexes as a migration (#527) (diff) | |
| download | gotosocial-b56dae8120d43b9acd3d3ed4d40100ffab7b972a.tar.xz | |
[chore] Update all but bun libraries (#526)
* update all but bun libraries
Signed-off-by: kim <grufwub@gmail.com>
* remove my personal build script changes
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go')
| -rw-r--r-- | vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go b/vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go new file mode 100644 index 000000000..566b70628 --- /dev/null +++ b/vendor/github.com/spf13/viper/internal/encoding/toml/codec2.go @@ -0,0 +1,19 @@ +//go:build viper_toml2 +// +build viper_toml2 + +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) +} |
