MGet retrieves multiple elements from the map.
(keys ...string)
| 299 | |
| 300 | // MGet retrieves multiple elements from the map. |
| 301 | func (slm ShardLockMaps) MGet(keys ...string) map[string]interface{} { |
| 302 | data := make(map[string]interface{}) |
| 303 | for _, key := range keys { |
| 304 | if val, ok := slm.Get(key); ok { |
| 305 | data[key] = val |
| 306 | } |
| 307 | } |
| 308 | return data |
| 309 | } |
| 310 | |
| 311 | // GetAll returns a copy of all items in the map. |
| 312 | func (slm ShardLockMaps) GetAll() map[string]interface{} { |