Skip to content

Append() get file already closed when trying to append a second io.Reader #324

Open
@EdoaLive

Description

@EdoaLive

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

  • 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions