repl

package
v0.0.0-...-b20cf4f Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const GoalsDeep = "deep"
View Source
const MaxTableLines = 100
View Source
const Prompt = ">> "

Variables

This section is empty.

Functions

func ContainsWeekday

func ContainsWeekday(weekdays []time.Weekday, weekday time.Weekday) bool

func RegisterCommands

func RegisterCommands(name string, command Command)

Types

type Argument

type Argument struct {
	Name        string
	Description string
}

type Command

type Command struct {
	Description string
	Usage       string
	Arguments   []Argument
	Flags       []Flag
	Function    func(io.ReadWriter, []string)
}

type Flag

type Flag struct {
	Name        string
	Shortcut    string
	Description string
}

type Repl

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

func NewRepl

func NewRepl(loader data.Loader) *Repl

func (*Repl) ReadInput

func (repl *Repl) ReadInput() rune

func (*Repl) Start

func (repl *Repl) Start()

type TerminalReadWriter

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

func (TerminalReadWriter) Print

func (t TerminalReadWriter) Print(text string)

func (TerminalReadWriter) Read

func (t TerminalReadWriter) Read(b []byte) (int, error)

func (TerminalReadWriter) Write

func (t TerminalReadWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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