| Index: impl/memory/gkvlite_iter.go
|
| diff --git a/impl/memory/gkvlite_iter.go b/impl/memory/gkvlite_iter.go
|
| index 43cc46345fae93e17df5d471f6e14a67ddd35329..2b5d7374bc51ef8246382898431d2cc012aa0b0e 100644
|
| --- a/impl/memory/gkvlite_iter.go
|
| +++ b/impl/memory/gkvlite_iter.go
|
| @@ -14,7 +14,7 @@ import (
|
|
|
| type iterDefinition struct {
|
| // The collection to iterate over
|
| - c *memCollection
|
| + c memCollection
|
|
|
| // The prefix to always assert for every row. A nil prefix matches every row.
|
| prefix []byte
|
| @@ -119,6 +119,10 @@ type iterator struct {
|
| }
|
|
|
| func (def *iterDefinition) mkIter() *iterator {
|
| + if !def.c.IsReadOnly() {
|
| + panic("attempting to make an iterator with r/w collection")
|
| + }
|
| +
|
| cmdChan := make(chan *cmd)
|
| ret := &iterator{
|
| ch: cmdChan,
|
|
|