forked from TrueCloudLab/neoneo-go
interop: adjust documentation
This commit is contained in:
parent
df8141ff7d
commit
2f23d83a49
3 changed files with 9 additions and 8 deletions
|
@ -16,7 +16,7 @@ correspond to smartcontract and VM types:
|
||||||
non-byte slice - Array
|
non-byte slice - Array
|
||||||
map[K]V - map
|
map[K]V - map
|
||||||
Other types are defined explicitly in this pkg:
|
Other types are defined explicitly in this pkg:
|
||||||
Hash160, Hash256, InteropInterface, PublicKey, Signature
|
Hash160, Hash256, Interface, PublicKey, Signature
|
||||||
|
|
||||||
Note that unless written otherwise structures defined in this packages can't be
|
Note that unless written otherwise structures defined in this packages can't be
|
||||||
correctly created by new() or composite literals, they should be received from
|
correctly created by new() or composite literals, they should be received from
|
||||||
|
|
|
@ -6,14 +6,15 @@ package iterator
|
||||||
import "github.com/nspcc-dev/neo-go/pkg/interop/neogointernal"
|
import "github.com/nspcc-dev/neo-go/pkg/interop/neogointernal"
|
||||||
|
|
||||||
// Iterator represents a Neo iterator, it's an opaque data structure that can
|
// Iterator represents a Neo iterator, it's an opaque data structure that can
|
||||||
// be properly created by Create or storage.Find. Unlike enumerators, iterators
|
// be properly created by Create or storage.Find. Iterators range over key-value
|
||||||
// range over key-value pairs, so it's convenient to use them for maps. This
|
// pairs, so it's convenient to use them for maps. This structure is similar in
|
||||||
// structure is similar in function to Neo .net framework's Iterator.
|
// function to Neo .net framework's Iterator.
|
||||||
type Iterator struct{}
|
type Iterator struct{}
|
||||||
|
|
||||||
// Next advances the iterator returning true if it is was successful (and you
|
// Next advances the iterator returning true if it was successful (and you
|
||||||
// can use Key or Value) and false otherwise (and there are no more elements in
|
// can use Value to get value for slices or key-value pair for maps) and false
|
||||||
// this Iterator). This function uses `System.Iterator.Next` syscall.
|
// otherwise (and there are no more elements in this Iterator). This function
|
||||||
|
// uses `System.Iterator.Next` syscall.
|
||||||
func Next(it Iterator) bool {
|
func Next(it Iterator) bool {
|
||||||
return neogointernal.Syscall1("System.Iterator.Next", it).(bool)
|
return neogointernal.Syscall1("System.Iterator.Next", it).(bool)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
Package neo provides interface to NeoToken native contract.
|
Package neo provides interface to NeoToken native contract.
|
||||||
NEO token is special, it's not just a regular NEP-17 contract, it also
|
NEO token is special, it's not just a regular NEP-17 contract, it also
|
||||||
provides access to chain-specific settings and implements commmittee
|
provides access to chain-specific settings and implements committee
|
||||||
voting system.
|
voting system.
|
||||||
*/
|
*/
|
||||||
package neo
|
package neo
|
||||||
|
|
Loading…
Reference in a new issue