Commit Graph

8 Commits

Author SHA1 Message Date
David Calavera 443a5c2021 Make stdcopy.stdWriter goroutine safe.
Stop using global variables as prefixes to inject the writer header.
That can cause issues when two writers set the length of the buffer in
the same header concurrently.

Stop Writing to the internal buffer twice for each write. This could
mess up with the ordering information is written.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-26 16:51:18 -05:00
Stefan Weil 2eee613326 Fix some typos in comments and strings
Most of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-22 20:27:15 +01:00
Federico Gimenez 2368d23665 Added test coverage to StdCopy closes #11584
Some corner cases and error conditions are covered while reading
and writing

Signed-off-by: Federico Gimenez <fgimenez@coit.es>
2015-09-25 11:15:45 +02:00
Sergey Evstifeev 6335c90d4a Add StdCopy happy path test: both reading and writing
Signed-off-by: Sergey Evstifeev <sergey.evstifeev@gmail.com>
2015-09-23 17:27:32 +02:00
Federico Gimenez 3efe5ff22e Added tests for StdWriter.Write.
The tests added cover the case when the Writer field returns and error
and, related to that, when the number of written bytes is less than 0.

Signed-off-by: Federico Gimenez <fgimenez@coit.es>
2015-09-22 09:05:22 +02:00
Veres Lajos 5146232723 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
2015-08-07 23:25:49 +01:00
Vincent Demeester 2ed4ed50be Add some stdcopy_test (coverage)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-04-20 22:58:22 +02:00
Alexandr Morozov 55cac6c942 Benchmark for StdWriter.Write
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-17 19:24:07 +04:00