cli

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 39 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProgressUI = ui.Default
View Source
var ReplFS fs.FS = fstest.MapFS{
	"history": replFile,
}

Functions

func Annotate added in v0.4.0

func Annotate(ctx context.Context, out io.Writer, loc bass.Range)

func InputsSource added in v0.5.0

func InputsSource(inputs []string) *bass.Source

func Repl added in v0.4.0

func Repl(ctx context.Context, scope *bass.Scope) error

func Run added in v0.7.0

func Run(ctx context.Context, env *bass.Scope, inputs []string, filePath string, argv []string, stdout *bass.Sink) error

func Task added in v0.7.0

func WithProgress added in v0.7.0

func WithProgress(ctx context.Context, f func(context.Context) error) (err error)

func WriteError

func WriteError(ctx context.Context, err error)

func WriteTrace

func WriteTrace(ctx context.Context, out io.Writer, trace *bass.Trace)

Types

type Progress added in v0.6.0

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

func NewProgress added in v0.6.0

func NewProgress() *Progress

func (*Progress) Close added in v0.6.0

func (prog *Progress) Close()

func (*Progress) EachVertex added in v0.6.0

func (prog *Progress) EachVertex(f func(*Vertex) error) error

func (*Progress) Summarize added in v0.6.0

func (prog *Progress) Summarize(w io.Writer)

func (*Progress) WrapError added in v0.6.0

func (prog *Progress) WrapError(msg string, err error) *ProgressError

func (*Progress) WriteStatus added in v0.6.0

func (prog *Progress) WriteStatus(status *graph.SolveStatus)

type ProgressError added in v0.6.0

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

func (ProgressError) Error added in v0.6.0

func (err ProgressError) Error() string

func (ProgressError) NiceError added in v0.6.0

func (progErr ProgressError) NiceError(w io.Writer, outer error) error

type ReplSession added in v0.4.0

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

func (*ReplSession) Complete added in v0.4.0

func (session *ReplSession) Complete(doc prompt.Document) []prompt.Suggest

func (*ReplSession) Prefix added in v0.4.0

func (session *ReplSession) Prefix() (string, bool)

func (*ReplSession) ReadLine added in v0.4.0

func (session *ReplSession) ReadLine(in string)

type Vertex added in v0.6.0

type Vertex struct {
	*graph.Vertex

	Log *bytes.Buffer
}

Jump to

Keyboard shortcuts

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