We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To reproduce: https://play.golang.org/p/-mM7CBvnFVl
I'd put fmt.Println(f.fileData.data) to (*mem.File).WriteAt, so I got
fmt.Println(f.fileData.data)
(*mem.File).WriteAt
[0 0 0 0 0 1 2 3 4 5] [1 2 3 4 5 1 2 3 4 5] [1 2 3 4 5 1 2 3 4 5 1 2 3 4 5] [0 0 0 0 0 1 2 3 4 5] [0 0 0 0 0 1 2 3 4 5]
Seems like Write does not copy old data if reallocation needed.
Write
The text was updated successfully, but these errors were encountered:
fix(mem): do not overwrite old data in some cases (fixes spf13#286)
7b47fea
Also, there is a possible race condition Between
afero/mem/file.go
Line 283 in 32b5faa
Line 261 in 32b5faa
f.at
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
To reproduce: https://play.golang.org/p/-mM7CBvnFVl
I'd put
fmt.Println(f.fileData.data)
to(*mem.File).WriteAt
, so I gotSeems like
Write
does not copy old data if reallocation needed.The text was updated successfully, but these errors were encountered: