mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 12:59:23 +08:00
a5e2d6b6fb
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>
25 lines
369 B
Go
25 lines
369 B
Go
package common
|
|
|
|
import "reflect"
|
|
|
|
type Str2Str map[string]string
|
|
|
|
func (m Str2Str) Clone() Str2Str {
|
|
if m == nil {
|
|
return nil
|
|
}
|
|
clone := make(Str2Str)
|
|
for key, value := range m {
|
|
clone[key] = value
|
|
}
|
|
return clone
|
|
}
|
|
|
|
func (m Str2Str) Equal(other Str2Str) bool {
|
|
return reflect.DeepEqual(m, other)
|
|
}
|
|
|
|
func CloneStr2Str(m Str2Str) Str2Str {
|
|
return m.Clone()
|
|
}
|