BytesDecode copies the slice of bytes b into obj.
(ctx context.Context, b []byte, obj any)
| 471 | |
| 472 | // BytesDecode copies the slice of bytes b into obj. |
| 473 | func BytesDecode(ctx context.Context, b []byte, obj any) error { |
| 474 | v := obj.(*[]byte) |
| 475 | *v = b[:] |
| 476 | return nil |
| 477 | } |
| 478 | |
| 479 | // DecryptDecode returns a decode function that can be passed to NewDecoder when |
| 480 | // decoding an encrypted message (https://godoc.org/gocloud.dev/secrets). |