| 97 | } |
| 98 | |
| 99 | func ExampleKeeper_Decrypt() { |
| 100 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
| 101 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. |
| 102 | ctx := context.Background() |
| 103 | var keeper *secrets.Keeper |
| 104 | |
| 105 | var cipherText []byte // obtained from elsewhere and random-looking |
| 106 | plainText, err := keeper.Decrypt(ctx, cipherText) |
| 107 | if err != nil { |
| 108 | log.Fatal(err) |
| 109 | } |
| 110 | |
| 111 | // PRAGMA: On gocloud.dev, hide the rest of the function. |
| 112 | _ = plainText |
| 113 | } |