mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-06 19:12:19 +00:00
13 lines
222 B
Go
13 lines
222 B
Go
|
package common
|
||
|
|
||
|
// CopyBytes returns an exact copy of the provided bytes.
|
||
|
func CopyBytes(b []byte) (copiedBytes []byte) {
|
||
|
if b == nil {
|
||
|
return nil
|
||
|
}
|
||
|
copiedBytes = make([]byte, len(b))
|
||
|
copy(copiedBytes, b)
|
||
|
|
||
|
return
|
||
|
}
|