Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasNativePkg ¶
func InitOrder ¶
func InitOrder() []string
InitOrder returns the initialization order of the standard libraries. This is calculated starting from the list of all standard libraries and iterating through each: if a package depends on an unitialized package, that is processed first, and so on recursively; matching the behaviour of Go's program initialization.
Types ¶
type BankerInterface ¶
type BankerInterface = execctx.BankerInterface
These types are aliases to the equivalent types in internal/execctx. The package exists to avoid an import cycle (this package imports individual stdlibs through generated.go; thus packages cannot import this package).
type ExecContext ¶
type ExecContext = execctx.ExecContext
These types are aliases to the equivalent types in internal/execctx. The package exists to avoid an import cycle (this package imports individual stdlibs through generated.go; thus packages cannot import this package).
func GetContext ¶
func GetContext(m *gno.Machine) ExecContext
GetContext returns the execution context. This is used to allow extending the exec context using interfaces, for instance when testing.
type ExecContexter ¶
type ExecContexter = execctx.ExecContexter
ExecContexter is a type capable of returning the parent ExecContext. When using these standard libraries, m.Context should always implement this interface. This can be obtained by embedding ExecContext.
type NativeFunc ¶
type NativeFunc struct {
// contains filtered or unexported fields
}
NativeFunc represents a function in the standard library which has a native (go-based) implementation, commonly referred to as a "native binding".
func FindNative ¶
func FindNative(pkgPath string, name gno.Name) *NativeFunc
FindNative returns the NativeFunc associated with the given pkgPath+name combination. If there is none, FindNative returns nil.
func (*NativeFunc) HasMachineParam ¶
func (n *NativeFunc) HasMachineParam() bool
HasMachineParam returns whether the given native binding has a machine parameter. This means that the Go version of this function expects a *gno.Machine as its first parameter.
type ParamsInterface ¶
type ParamsInterface = execctx.ParamsInterface
These types are aliases to the equivalent types in internal/execctx. The package exists to avoid an import cycle (this package imports individual stdlibs through generated.go; thus packages cannot import this package).