Skip to content

justinwalz/interaction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Interaction

A golang library to enhance a cli with REPL-esque command execution. Adapted from Google's seesaw_cli

Usage

You must provide an execute function when creating an Interactor, which handles commands as they are parsed.

func Execute(command string) error

You can optionally provide a prompt, and a slice of signals to listen for and initiate an exit.

Prompt string
ExitSignals []os.Signal

Examples

See the examples directory for some example usages

  • Simple: passes commands to locally defined Execute function (strings.ToUpper).
  • [TODO] Package: separates out responsibilities for handling connection, context loading, and execution.

About

Create and manage an interactive terminal for REPL like behavior

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages