From d64f2bb3bb33aef6cc780cd83ebe8179268e64b3 Mon Sep 17 00:00:00 2001 From: Alessandro Date: Fri, 9 Aug 2024 09:22:34 +0200 Subject: [PATCH] updated cleveldb Iterator API docs to conform to the changes made in #168 --- cleveldb_iterator.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cleveldb_iterator.go b/cleveldb_iterator.go index cf5ac19..7ed0344 100644 --- a/cleveldb_iterator.go +++ b/cleveldb_iterator.go @@ -95,12 +95,16 @@ func (itr cLevelDBIterator) Valid() bool { } // Key implements Iterator. +// The caller should not modify the contents of the returned slice. +// Instead, the caller should make a copy and work on the copy. func (itr cLevelDBIterator) Key() []byte { itr.assertIsValid() return itr.source.Key() } // Value implements Iterator. +// The caller should not modify the contents of the returned slice. +// Instead, the caller should make a copy and work on the copy. func (itr cLevelDBIterator) Value() []byte { itr.assertIsValid() return itr.source.Value()