runner

package
v0.0.0-...-42c42d4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: BSD-3-Clause Imports: 21 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanSession

func CleanSession(lgopath string, sessID *SessionID) error

CleanSession cleans up files for a session specified by sessNum. CleanSession returns nil when no target file exists.

func PrintError

func PrintError(w io.Writer, err error)

PrintError prints err to w. If err is scanner.ErrorList or convert.ErrorList, it expands internal errors.

Types

type LgoRunner

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

func NewLgoRunner

func NewLgoRunner(lgopath string, sessID *SessionID) *LgoRunner

func (*LgoRunner) Complete

func (rn *LgoRunner) Complete(ctx context.Context, src string, index int) (matches []string, start, end int)

func (*LgoRunner) ExecCount

func (rn *LgoRunner) ExecCount() int64

func (*LgoRunner) Inspect

func (rn *LgoRunner) Inspect(ctx context.Context, src string, index int) (string, error)

Inspect analyzes src and returns the document of an identifier at index (0-based).

func (*LgoRunner) Run

func (rn *LgoRunner) Run(ctx core.LgoContext, src string) error

type SessionID

type SessionID struct {
	Time int64 `json:"time"`
}

func NewSessionID

func NewSessionID() *SessionID

func (*SessionID) Marshal

func (s *SessionID) Marshal() string

func (*SessionID) Unmarshal

func (s *SessionID) Unmarshal(h string) error

Jump to

Keyboard shortcuts

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