milvus/internal/common/byte_slice.go
Jiquan Long a5e2d6b6fb
Refactor RootCoord (#18930)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
Co-authored-by: xaxys <tpnnghd@163.com>

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
Co-authored-by: xaxys <tpnnghd@163.com>
2022-09-05 13:29:11 +08:00

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()
}