MCPcopy Create free account
hub / github.com/google/go-cloud / BytesDecode

Function BytesDecode

runtimevar/runtimevar.go:473–477  ·  view source on GitHub ↗

BytesDecode copies the slice of bytes b into obj.

(ctx context.Context, b []byte, obj any)

Source from the content-addressed store, hash-verified

471
472// BytesDecode copies the slice of bytes b into obj.
473func 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).

Callers 1

DecryptDecodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected