repl

package
v0.6.5-rc32 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: EPL-1.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(opts ...Option)

Types

type EvalFunc added in v0.6.5

type EvalFunc func(*options, interface{}) (string, error)

EvalFunc is the signature for eval functions passed to readEvalPrint. CLI wraps evalSafe with signal handling; WASM uses evalSafe directly.

type Option

type Option func(*options)

Option is a functional option for the REPL.

func WithEnvironment

func WithEnvironment(env lang.Environment) Option

WithEnvironment sets the execution environment for the REPL.

func WithHistoryFile added in v0.6.5

func WithHistoryFile(path, format string) Option

WithHistoryFile sets the history file path and format. Format is "jline" for JLine format (Babashka/Leiningen), or empty for default JSON.

func WithNREPLClient added in v0.6.5

func WithNREPLClient(c *nrepl.Client) Option

WithNREPLClient configures the REPL to send code to a remote nREPL server instead of evaluating locally.

func WithStdin

func WithStdin(r io.Reader) Option

WithStdin sets the stdin for the REPL.

func WithStdout

func WithStdout(w io.Writer) Option

WithStdout sets the stdout for the REPL.

Jump to

Keyboard shortcuts

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