Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Stream - Support multi-writers #58

Merged
merged 4 commits into from
Mar 18, 2024
Merged

File Stream - Support multi-writers #58

merged 4 commits into from
Mar 18, 2024

Conversation

Or-Geva
Copy link
Collaborator

@Or-Geva Or-Geva commented Mar 17, 2024

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • I labeled this pull request with one of the following: 'breaking change', 'new feature', 'bug', or 'ignore for release'

Allow the option to split a multipart file into two or more separate files. Without using a multi-writer setup, it's tricky to do this because once we've taken the content from the body and written it to one file, we can't write it to another since it's already been used up.

Copy link
Member

@omerzi omerzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think that it worth writing a unit test for the asyncMultiWriter.

http/filestream/filestream.go Outdated Show resolved Hide resolved
http/filestream/filestream.go Show resolved Hide resolved
http/filestream/filestream.go Outdated Show resolved Hide resolved
io/multiwriter.go Outdated Show resolved Hide resolved
io/multiwriter.go Outdated Show resolved Hide resolved
io/multiwriter.go Outdated Show resolved Hide resolved
io/multiwriter.go Outdated Show resolved Hide resolved
io/multiwriter_test.go Outdated Show resolved Hide resolved
io/multiwriter.go Outdated Show resolved Hide resolved
"golang.org/x/sync/errgroup"
)

var ErrShortWrite = errors.New("short write")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is short write?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to
"The number of bytes written is less than the length of the input"

io/multiwriter_test.go Outdated Show resolved Hide resolved
@Or-Geva Or-Geva merged commit 63a831b into dev Mar 18, 2024
11 of 12 checks passed
@omerzi omerzi added new feature Automatically generated release notes improvement Automatically generated release notes and removed new feature Automatically generated release notes labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants