arraictx

package
v0.207.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 5 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 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 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