1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +02:00

fix: some linting issues (#2563)

This commit is contained in:
David Brouwer
2022-09-30 16:27:07 +02:00
committed by GitHub
parent 47e6a8d725
commit 85c0b0b8eb
221 changed files with 1025 additions and 1283 deletions

View File

@ -30,14 +30,14 @@ func TestBox(t *testing.T) {
}
aliceSecret := []byte("Why is a raven like a writing-desk?")
if _, err := alice.Encrypt(aliceSecret); err == nil {
t.Error("alice.Encrypt succeded without a public key")
t.Error("alice.Encrypt succeeded without a public key")
}
enc, err := alice.Encrypt(aliceSecret, secrets.RecipientPublicKey(bob.Options().PublicKey))
if err != nil {
t.Error("alice.Encrypt failed")
}
if _, err := bob.Decrypt(enc); err == nil {
t.Error("bob.Decrypt succeded without a public key")
t.Error("bob.Decrypt succeeded without a public key")
}
if dec, err := bob.Decrypt(enc, secrets.SenderPublicKey(alice.Options().PublicKey)); err == nil {
if !reflect.DeepEqual(dec, aliceSecret) {