12 lines
160 B
Go
12 lines
160 B
Go
|
package types
|
||
|
|
||
|
// copy bytes
|
||
|
func CopyBytes(bz []byte) (ret []byte) {
|
||
|
if bz == nil {
|
||
|
return nil
|
||
|
}
|
||
|
ret = make([]byte, len(bz))
|
||
|
copy(ret, bz)
|
||
|
return ret
|
||
|
}
|