mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-11 00:02:28 +08:00
refact: preallocate in Merge map
This commit is contained in:
@@ -107,14 +107,14 @@ func TestMerge(t *testing.T) {
|
||||
2: "b",
|
||||
}
|
||||
m2 := map[int]string{
|
||||
1: "1",
|
||||
3: "2",
|
||||
2: "c",
|
||||
3: "d",
|
||||
}
|
||||
|
||||
expected := map[int]string{
|
||||
1: "1",
|
||||
2: "b",
|
||||
3: "2",
|
||||
1: "a",
|
||||
2: "c",
|
||||
3: "d",
|
||||
}
|
||||
acturl := Merge(m1, m2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user