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 example error #13138

Closed
s-mang opened this issue Nov 3, 2015 · 3 comments
Closed

crypto/rand: Read example error #13138

s-mang opened this issue Nov 3, 2015 · 3 comments

Comments

@s-mang
Copy link
Contributor

s-mang commented Nov 3, 2015

https://golang.org/pkg/crypto/rand/
The last example, Read prints an error upon running.

I don't see anything wrong with the example code, though I don't play with this package much.

out:
error: read /dev/urandom: Invalid argument

Screenshot:
screen shot 2015-11-03 at 1 33 19 pm

Wish I could be more help :/

Sarah

@rakyll
Copy link
Contributor

rakyll commented Nov 3, 2015

It is a playground restriction. Duplicate of #5096.

The same call must work fine on your own machine.

@rakyll rakyll closed this as completed Nov 3, 2015
@rakyll rakyll changed the title crypto/rand Read example error crypto/rand: Read example error Nov 3, 2015
@adg
Copy link
Contributor

adg commented Nov 3, 2015

This is related to issue #5096

@s-mang
Copy link
Contributor Author

s-mang commented Nov 3, 2015

ah, thx @rakyll . yep it works fine on my box

@golang golang locked and limited conversation to collaborators Nov 4, 2016
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

4 participants