MCPcopy
hub / github.com/dgraph-io/badger / SafeCopy

Function SafeCopy

y/y.go:107–109  ·  view source on GitHub ↗

SafeCopy does append(a[:0], src...).

(a, src []byte)

Source from the content-addressed store, hash-verified

105
106// SafeCopy does append(a[:0], src...).
107func SafeCopy(a, src []byte) []byte {
108 return append(a[:0], src...)
109}
110
111// Copy copies a byte slice and returns the copied slice.
112func Copy(a []byte) []byte {

Callers 11

publishUpdatesMethod · 0.92
GetMethod · 0.92
populateDiscardStatsMethod · 0.92
produceRangesMethod · 0.92
AddMethod · 0.92
compactBuildTablesMethod · 0.92
KeyCopyMethod · 0.92
ValueCopyMethod · 0.92
yieldItemValueMethod · 0.92
parseItemMethod · 0.92
fillMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…