Skip to content

Commit

Permalink
ioutil -> io
Browse files Browse the repository at this point in the history
  • Loading branch information
lainio committed Feb 19, 2024
1 parent 7dc62cc commit 598fd73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
@@ -53,14 +53,14 @@ them. The CopyFile example shows how it works:
The try package provides convenient helpers to check the errors. For example,
instead of
b, err := ioutil.ReadAll(r)
b, err := io.ReadAll(r)
if err != nil {
return err
}
we can write
b := try.To1(ioutil.ReadAll(r))
b := try.To1(io.ReadAll(r))
Note that try.ToX functions are as fast as if err != nil statements. Please see
the try package documentation for more information about the error checks.

0 comments on commit 598fd73

Please sign in to comment.