[chore] update viper version (#2539)

* update viper version

* removes our last uses of the slice package

* fix tests
This commit is contained in:
kim
2024-01-17 14:54:30 +00:00
committed by GitHub
parent c5eced5fd1
commit 906639ad7e
166 changed files with 11771 additions and 2782 deletions

View File

@ -5,9 +5,9 @@ import (
)
// Decoder decodes the contents of b into v.
// It's primarily used for decoding contents of a file into a map[string]interface{}.
// It's primarily used for decoding contents of a file into a map[string]any.
type Decoder interface {
Decode(b []byte, v map[string]interface{}) error
Decode(b []byte, v map[string]any) error
}
const (
@ -48,7 +48,7 @@ func (e *DecoderRegistry) RegisterDecoder(format string, enc Decoder) error {
}
// Decode calls the underlying Decoder based on the format.
func (e *DecoderRegistry) Decode(format string, b []byte, v map[string]interface{}) error {
func (e *DecoderRegistry) Decode(format string, b []byte, v map[string]any) error {
e.mu.RLock()
decoder, ok := e.decoders[format]
e.mu.RUnlock()