starlark

package
v0.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecForTest

func ExecForTest(name string, data string, fn Fn) (lib.StringDict, error)

func GetCtx

func GetCtx(thread *lib.Thread) context.Context

func GetCurrentFilePath

func GetCurrentFilePath(thread *lib.Thread) string

func GetDryRunMode

func GetDryRunMode(thread *lib.Thread) bool

func NewThread

func NewThread(name string, options ...ThreadOption) *lib.Thread

Types

type Fn

type Fn = func(thread *lib.Thread, b *lib.Builtin, args lib.Tuple, kargs []lib.Tuple) (lib.Value, error)

type LoadFn

type LoadFn = func(thread *lib.Thread, module string) (lib.StringDict, error)

func Load

func Load(fs afero.Fs, predeclared lib.StringDict) LoadFn

type ThreadOption

type ThreadOption func(thread *lib.Thread)

func WithContext

func WithContext(ctx context.Context) ThreadOption

func WithDryRunMode

func WithDryRunMode(dryrun bool) ThreadOption

func WithLoad

func WithLoad(loadFn LoadFn) ThreadOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL