Function
lookupKey
(mapBytes, target scode.Bytes)
Source from the content-addressed store, hash-verified
| 651 | } |
| 652 | |
| 653 | func lookupKey(mapBytes, target scode.Bytes) (scode.Bytes, bool) { |
| 654 | for it := mapBytes.Iter(); !it.Done(); { |
| 655 | key := it.Next() |
| 656 | val := it.Next() |
| 657 | if bytes.Equal(key, target) { |
| 658 | return val, true |
| 659 | } |
| 660 | } |
| 661 | return nil, false |
| 662 | } |
| 663 | |
| 664 | // Index represents an index operator "container[index]" where container is |
| 665 | // either an array (with index type integer) or a record (with index type string). |
Tested by
no test coverage detected