repl

package
v0.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type REPL

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

REPL represents an instance of the interactive shell.

func New

func New(dataStore *storage.DataStore, policyStore *storage.PolicyStore, historyPath string, output io.Writer, outputFormat string) *REPL

New returns a new instance of the REPL.

func (*REPL) Loop

func (r *REPL) Loop()

Loop will run until the user enters "exit", Ctrl+C, Ctrl+D, or an unexpected error occurs.

func (*REPL) OneShot

func (r *REPL) OneShot(line string) bool

OneShot evaluates a single line and prints the result. Returns true if caller should exit.

Jump to

Keyboard shortcuts

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