fix(all): introduce and use iox.CopyContext (#380)
* fix(all): introduce and use iox.CopyContext This PR is part of https://github.com/ooni/probe/issues/1417. In https://github.com/ooni/probe-cli/pull/379 we introduced a context aware wrapper for io.ReadAll (formerly ioutil.ReadAll). Here we introduce a context aware wrapper for io.Copy. * fix(humanize): more significant digits * fix: rename humanize files to follow the common pattern * fix aligment * fix test
This commit is contained in:
parent
0fdc9cafb5
commit
721ce95315
15 changed files with 143 additions and 51 deletions
|
|
@ -63,7 +63,8 @@ run `go mod tidy` to minimize such changes.
|
|||
|
||||
- use `./internal/fsx.OpenFile` when you need to open a file
|
||||
|
||||
- use `./internal/iox.ReadAllContext` instead of `ioutil.ReadAll`
|
||||
- use `./internal/iox.ReadAllContext` instead of `io.ReadAll`
|
||||
and `./internal/iox.CopyContext` instead of `io.Copy`
|
||||
|
||||
## Code testing requirements
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue