repl

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTypePrinter

func AddTypePrinter[T any](r *REPL, p func(w io.Writer, t T, concise bool) error)

Types

type ArgDoc

type ArgDoc struct {
	Name  string
	Brief string
}

type CommandOpt

type CommandOpt interface {
	// contains filtered or unexported methods
}

type Doc

type Doc struct {
	Brief    string
	Usage    string
	Args     []ArgDoc
	Detailed string
}

type NoResults

type NoResults struct{}

type REPL

type REPL struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...ucl.InstOption) *REPL

func (*REPL) EvalAndDisplay

func (r *REPL) EvalAndDisplay(ctx context.Context, expr string) error

func (*REPL) Inst

func (r *REPL) Inst() *ucl.Inst

func (*REPL) SetCommand

func (r *REPL) SetCommand(name string, fn ucl.BuiltinHandler, opts ...CommandOpt)

Source Files

  • docs.go
  • evaldisplay.go
  • repl.go
  • typeprinter.go

Jump to

Keyboard shortcuts

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