Open dengtaobeijing opened 5 years ago
@dengtaobeijing map需要做深复制,如:
a := map[string]interface{}{
"product_id": 1,
"name": "Desk",
"price": 100,
"discount": false,
}
c := Collect(a)
c.Pull("name"))
// 由于collection是imimmutable的,此时c.value不能变,需要跟a原来的值一样
Pull Put SortBy