MCPcopy Create free account
hub / github.com/cockroachdb/redact / clone

Method clone

internal/buffer/buffer.go:338–342  ·  view source on GitHub ↗

clone is used in tests.

()

Source from the content-addressed store, hash-verified

336
337// clone is used in tests.
338func (b *Buffer) clone() *Buffer {
339 c := *b
340 c.buf = append([]byte(nil), b.buf...)
341 return &c
342}
343
344// makeSlice allocates a slice of size n. If the allocation fails, it panics
345// with ErrTooLarge.

Callers 1

Example_mixed_writesFunction · 0.95

Calls

no outgoing calls

Tested by 1

Example_mixed_writesFunction · 0.76