From 8d5f97a699bc5438fed907736c059ecb4a849a5d Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 20 Sep 2022 17:09:48 +0300 Subject: [PATCH] interop: adjust Iterator documentation The only way to get Iterator is as a result of storage.Find. --- pkg/interop/iterator/iterator.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/interop/iterator/iterator.go b/pkg/interop/iterator/iterator.go index c24ae6ffe..391e64cf3 100644 --- a/pkg/interop/iterator/iterator.go +++ b/pkg/interop/iterator/iterator.go @@ -6,8 +6,8 @@ package iterator import "github.com/nspcc-dev/neo-go/pkg/interop/neogointernal" // Iterator represents a Neo iterator, it's an opaque data structure that can -// be properly created by Create or storage.Find. Iterators range over key-value -// pairs, so it's convenient to use them for maps. This structure is similar in +// be properly created by storage.Find. Iterators range over key-value pairs, +// so it's convenient to use them for maps. This structure is similar in // function to Neo .net framework's Iterator. type Iterator struct{} @@ -22,7 +22,7 @@ func Next(it Iterator) bool { // Value returns iterator's current value. It's only valid to call after // a successful Next call. This function uses `System.Iterator.Value` syscall. // For slices, the result is just value. -// For maps, the result can be casted to a slice of 2 elements: a key and a value. +// For maps, the result can be cast to a slice of 2 elements: a key and a value. // For storage iterators, refer to `storage.FindFlags` documentation. func Value(it Iterator) interface{} { return neogointernal.Syscall1("System.Iterator.Value", it)