mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
30eb137200
Fixes golint warnings: "don't use an underscore in package name" and makes our examples better. Refs. #213.
19 lines
471 B
Go
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
|
|
}
|