I know it's not necessary. I was trying to make a point in the example ...
11 years, 8 months ago
(2013-09-05 16:30:33 UTC)
#4
I know it's not necessary. I was trying to make a point in the example
that you can rely on it being full.
But yeah, we don't want to encourage people to do that check. Removed.
On Thu, Sep 5, 2013 at 9:29 AM, <rsc@golang.org> wrote:
>
> https://codereview.appspot.**com/13523044/diff/3002/src/**
>
pkg/crypto/rand/example_test.**go<https://codereview.appspot.com/13523044/diff/3002/src/pkg/crypto/rand/example_test.go>
> File src/pkg/crypto/rand/example_**test.go (right):
>
> https://codereview.appspot.**com/13523044/diff/3002/src/**
>
pkg/crypto/rand/example_test.**go#newcode19<https://codereview.appspot.com/13523044/diff/3002/src/pkg/crypto/rand/example_test.go#newcode19>
> src/pkg/crypto/rand/example_**test.go:19: if err != nil || n != c {
> This should be
>
> if err != nil {
>
> There is no need to check n != c, just like the old example did not
> check it.
>
>
https://codereview.appspot.**com/13523044/<https://codereview.appspot.com/135...
>
Issue 13523044: code review 13523044: crypto/rand: make Read use io.ReadFull
(Closed)
Created 11 years, 8 months ago by bradfitz
Modified 11 years, 8 months ago
Reviewers:
Base URL:
Comments: 1