neo-go/examples/iterator/iterator.go
Roman Khimov 30eb137200 examples: remove underscores from package names
Fixes golint warnings: "don't use an underscore in package name" and makes our
examples better. Refs. #213.
2019-09-03 18:00:10 +03:00

19 lines
471 B
Go

package iteratorcontract
import (
"github.com/CityOfZion/neo-go/pkg/interop/iterator"
"github.com/CityOfZion/neo-go/pkg/interop/runtime"
"github.com/CityOfZion/neo-go/pkg/interop/storage"
)
// Main is Main(), really.
func Main() bool {
iter := storage.Find(storage.GetContext(), []byte("foo"))
values := iterator.Values(iter)
keys := iterator.Keys(iter)
runtime.Notify("found storage values", values)
runtime.Notify("found storage keys", keys)
return true
}