Documentation ¶
Index ¶
- func Args(ctx context.Context) []string
- func ContextWithIsCompiling(ctx context.Context, on bool) context.Context
- func InitCliCtx(ctx context.Context, c *cli.Context) context.Context
- func InitRunCtx(ctx context.Context) context.Context
- func IsCompiling(ctx context.Context) bool
- func WithArgs(ctx context.Context, args ...string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithIsCompiling ¶ added in v0.217.0
ContextWithIsCompiling returns a context with a flag indicating whether compiling mode is on.
func InitCliCtx ¶ added in v0.184.0
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 ¶
InitRunCtx returns a context for evaluating arr.ai programs.
func IsCompiling ¶ added in v0.217.0
IsCompiling checks if the context is in compiling mode.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.