File src/pkg/crypto/cipher/example_test.go (right):
https://codereview.appspot.com/6631044/diff/1002/src/pkg/crypto/cipher/example_test.go#newcode16
src/pkg/crypto/cipher/example_test.go:16: func
ExampleNewCBCDecrypter(key, ciphertext []byte) ([]byte, error) {
On 2012/10/08 19:42:23, agl1 wrote:
clearer here to
have a free variable called `key', than to fluff around with reading a random
key and distract from the subject of the example.
If you have actual key, ciphertext, and plaintext globals then you canOn 2012/10/08 19:38:12, minux wrote:
example functions can't take arguments.
Although the arguments don't appear in the example, I think it'sexample functions can't take arguments.
clearer here to
have a free variable called `key', than to fluff around with reading a random
key and distract from the subject of the example.
actually make these examples executable by including an Output: comment
at the end of the function.
As they are, the user doesn't see the functions signature so the return
statements are a non-sequitur.
https://codereview.appspot.com/6631044/