diff options
| author | Kevin Burke <kev@inburke.com> | 2017-11-27 20:39:32 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-11-28 17:48:09 +0000 |
| commit | e8f229864d71a49e5fdc4a9a134c5f85c4c33d64 (patch) | |
| tree | d40198047e72be3bf3c9585764ceae27354a7f0f /openpgp | |
| parent | 48a5a650cfc529a2517eb6a4d6d6749872520525 (diff) | |
| download | go-x-crypto-e8f229864d71a49e5fdc4a9a134c5f85c4c33d64.tar.xz | |
all: fix errors reported by vet, golint
None are "wrong" per se, but there are a lot of good suggestions and
in one case a docstring that was not present in godoc due to the
presence of an extra newline.
Changed "Id" in struct properties to "ID" in some non-exported
structs. Removed a trailing period from some error messages; I believe
the exact contents of error strings are not covered by the Go
compatibility promise.
Change-Id: I7c620582dc247396f72c52d38c909ccc0ec87b83
Reviewed-on: https://go-review.googlesource.com/80145
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'openpgp')
| -rw-r--r-- | openpgp/keys.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openpgp/keys.go b/openpgp/keys.go index 68b14c6..744e293 100644 --- a/openpgp/keys.go +++ b/openpgp/keys.go @@ -325,9 +325,8 @@ func ReadEntity(packets *packet.Reader) (*Entity, error) { if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok { packets.Unread(p) return nil, errors.StructuralError("first packet was not a public/private key") - } else { - e.PrimaryKey = &e.PrivateKey.PublicKey } + e.PrimaryKey = &e.PrivateKey.PublicKey } if !e.PrimaryKey.PubKeyAlgo.CanSign() { |
