Skip to content
New issue

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

crypto/rand: Read should call io.ReadFull #6084

Closed
jaekwon opened this issue Aug 8, 2013 · 4 comments
Closed

crypto/rand: Read should call io.ReadFull #6084

jaekwon opened this issue Aug 8, 2013 · 4 comments

Comments

@jaekwon
Copy link

jaekwon commented Aug 8, 2013

http://golang.org/pkg/crypto/rand/

The example is supposedly for the Read function, but it's actually just a usage of
Reader.

Fix: Move existing example under rand.Reader, and create a new example for rand.Read
@robpike
Copy link
Contributor

robpike commented Aug 9, 2013

Comment 1:

Labels changed: added priority-soon, go1.2, documentation, removed priority-triage, go1.2maybe.

Status changed to Accepted.

@bradfitz
Copy link
Contributor

bradfitz commented Sep 4, 2013

Comment 2:

Creating an example for Read is hard because it's hard to use correctly or usefully,
since it may return less than len(b).  If anything, we should change it and document it
to return exactly len(b) bytes or an error.

@rsc
Copy link
Contributor

rsc commented Sep 5, 2013

Comment 3:

Read should call io.ReadFull.

@bradfitz
Copy link
Contributor

bradfitz commented Sep 6, 2013

Comment 4:

This issue was closed by revision c327e82.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants