mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
c9d0c157ec
Signed-off-by: jaime <yun.zhang@zilliz.com>
20 lines
316 B
Go
20 lines
316 B
Go
package common
|
|
|
|
import "reflect"
|
|
|
|
type ByteSlice []byte
|
|
|
|
func (s ByteSlice) Clone() ByteSlice {
|
|
clone := make(ByteSlice, len(s))
|
|
copy(clone, s)
|
|
return clone
|
|
}
|
|
|
|
func (s ByteSlice) Equal(other ByteSlice) bool {
|
|
return reflect.DeepEqual(s, other)
|
|
}
|
|
|
|
func CloneByteSlice(s ByteSlice) ByteSlice {
|
|
return s.Clone()
|
|
}
|