arraictx

package
v0.267.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Args added in v0.184.0

func Args(ctx context.Context) []string

Args returns the args stored in ctx.

func ContextWithIsCompiling added in v0.217.0

func ContextWithIsCompiling(ctx context.Context, on bool) context.Context

ContextWithIsCompiling returns a context with a flag indicating whether compiling mode is on.

func InitCliCtx added in v0.184.0

func InitCliCtx(ctx context.Context, c *cli.Context) context.Context

InitCliCtx returns an arr.ai context with the arguments set from the CLI context.

For example, command line `arrai -d r file.arrai arg1 arg2 arg3` will set `[]string{"file.arrai", "arg1", "arg2", "arg3"}` as the context value of `argsKey`.

func InitRunCtx

func InitRunCtx(ctx context.Context) context.Context

InitRunCtx returns a context for evaluating arr.ai programs.

func IsCompiling added in v0.217.0

func IsCompiling(ctx context.Context) bool

IsCompiling checks if the context is in compiling mode.

func WithArgs added in v0.184.0

func WithArgs(ctx context.Context, args ...string) context.Context

WithArgs sets the CLI arguments on the Go context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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