From c7157bf44926f489c5db1c830748d9072d17852f Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 4 Mar 2014 09:58:54 -0800 Subject: [PATCH] crypto/cipher: fix AEAD.Open documentation nit It mentioned true and false for error values. Instead, just don't mention the error semantics, as they match normal Go conventions (if error is non-nil, the other value is meaningless). We generally only document error values when they're interesting (where non-nil, non-nil is valid, or the error value can be certain known values or types). Fixes #7464 LGTM=agl R=agl CC=golang-codereviews https://golang.org/cl/68440044 --- src/pkg/crypto/cipher/gcm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pkg/crypto/cipher/gcm.go b/src/pkg/crypto/cipher/gcm.go index 2f748f02f7..bdafd85fc3 100644 --- a/src/pkg/crypto/cipher/gcm.go +++ b/src/pkg/crypto/cipher/gcm.go @@ -30,9 +30,9 @@ type AEAD interface { // Open decrypts and authenticates ciphertext, authenticates the // additional data and, if successful, appends the resulting plaintext - // to dst, returning the updated slice and true. On error, nil and - // false is returned. The nonce must be NonceSize() bytes long and both - // it and the additional data must match the value passed to Seal. + // to dst, returning the updated slice. The nonce must be NonceSize() + // bytes long and both it and the additional data must match the + // value passed to Seal. // // The ciphertext and dst may alias exactly or not at all. Open(dst, nonce, ciphertext, data []byte) ([]byte, error)