Documentation
¶
Overview ¶
Package internal contains types and utilities that are not part of the public API, and may change without notice.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecModuleWithErrorTest ¶
func ExecModuleWithErrorTest(t *testing.T, name string, loader ModuleLoadFunc, script string, wantErr error) (starlark.StringDict, error)
ExecModuleWithErrorTest executes a Starlark script with a module loader and compares the error with the expected error.
Types ¶
type FloatOrInt ¶
type FloatOrInt float64
FloatOrInt is an Unpacker that converts a Starlark int or float to Go's float64.
type ModuleLoadFunc ¶
type ModuleLoadFunc func() (starlark.StringDict, error)
ModuleLoadFunc is a function that loads a Starlark module and returns the module's string dict.
type ThreadLoadFunc ¶
ThreadLoadFunc is a function that loads a Starlark module by name, usually used by the Starlark thread.
func NewAssertLoader ¶
func NewAssertLoader(moduleName string, loader ModuleLoadFunc) ThreadLoadFunc
NewAssertLoader creates a Starlark thread loader that loads a module by name or asserts.star for testing.
Click to show internal directories.
Click to hide internal directories.