This commit is contained in:
Thulio Ferraz Assis 2025-03-30 23:12:23 +08:00 committed by GitHub
commit 1f33b9a2f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1670,7 +1670,9 @@ func (v *Viper) unmarshalReader(in io.Reader, c map[string]any) error {
} }
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
buf.ReadFrom(in) if _, err := buf.ReadFrom(in); err != nil {
return ConfigParseError{err}
}
// TODO: remove this once SupportedExts is deprecated/removed // TODO: remove this once SupportedExts is deprecated/removed
if !slices.Contains(SupportedExts, format) { if !slices.Contains(SupportedExts, format) {