Skip to content

Commit 549c0ca

Browse files
committed
lint
1 parent abbbc12 commit 549c0ca

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/secure/cipher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"crypto/rand"
3030
"crypto/rsa"
3131
"crypto/sha256"
32+
"errors"
3233
"fmt"
3334
"io"
3435
"math/big"
@@ -128,7 +129,7 @@ func (c *Cipher) Decoder(r io.Reader) (io.ReadCloser, error) {
128129
return piper.NewAES(aesKey, AES_GUARD).Decoder(r)
129130
}
130131

131-
var ErrNotRecipient = fmt.Errorf("not a recipient, the data is not encrypted for your public key")
132+
var ErrNotRecipient = errors.New("not a recipient, the data is not encrypted for your public key")
132133

133134
func EncryptSharedSecret(sharedKey []byte, pub crypto.PublicKey) ([]byte, error) {
134135
switch key := pub.(type) {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func fetchPublicKey(location string) whisper.PublicKey {
294294
return whisper.PublicKey{Data: b}
295295
}
296296

297-
var errPrvKeyExists = fmt.Errorf("private key already exists")
297+
var errPrvKeyExists = errors.New("private key already exists")
298298

299299
func genKey(path string) {
300300
if _, err := os.Stat(path); err == nil {

0 commit comments

Comments
 (0)