Skip to content

Commit a0d566c

Browse files
will it panic?
1 parent 16d53a2 commit a0d566c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AwsEncryptionSDK/runtimes/go/examples/misc/commitmentpolicy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ func CommitmentPolicyExample(exampleText, defaultKMSKeyId, defaultKmsKeyRegion s
119119
Keyring: awsKmsKeyring,
120120
Ciphertext: res.Ciphertext,
121121
})
122-
if err != nil {
123-
panic(err)
122+
if err == nil {
123+
panic("err")
124124
}
125125
// If you do not specify the encryption context on Decrypt, it's recommended to check if the resulting encryption context matches.
126126
// The encryption context was specified on decrypt; we are validating the encryption context for demonstration only.

0 commit comments

Comments
 (0)