You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing an io.Reader to Append() adds the Reader to the dataSources, but the Reload() closes the Reader after parse (file.go line 296).
Calling Append() a second time will call again Reload() which try to re-parse all dataSources and find the previous io.Reader closed, returning error.
To reproduce
Call Append() passing an io.Reader
Call Append() again with another source (any?)
Expected behavior
I don't think the Append() method was designed to be called just once, so I think this is an unexpected behavior.
I expected to be able to call Append() many times.
The text was updated successfully, but these errors were encountered:
Hmm, how can io.Reader be read more than once? I don't think that's an expected behavior of the interface either. I'm wondering if we should just ignore the EOF error, if the original data source is not a type capable of being re-read (e.g. io.Reader, io.ReadCloser).
Version
v1.66.6
Describe the bug
Passing an io.Reader to Append() adds the Reader to the dataSources, but the Reload() closes the Reader after parse (file.go line 296).
Calling Append() a second time will call again Reload() which try to re-parse all dataSources and find the previous io.Reader closed, returning error.
To reproduce
Expected behavior
I don't think the Append() method was designed to be called just once, so I think this is an unexpected behavior.
I expected to be able to call Append() many times.
The text was updated successfully, but these errors were encountered: