go-prompt/_example
David Garaña 25ab56b982 Fix http-prompt example (no exit)
Implement the exit function on the http-prompt example.
2019-06-28 12:28:00 +02:00
..
exec-command Update .travis.yml (#114) 2018-12-09 20:42:33 +09:00
http-prompt Fix http-prompt example (no exit) 2019-06-28 12:28:00 +02:00
live-prefix Update .travis.yml (#114) 2018-12-09 20:42:33 +09:00
simple-echo Update .travis.yml (#114) 2018-12-09 20:42:33 +09:00
README.md Update README of examples and tools 2018-10-21 19:04:26 +09:00
build.sh Migrate to go modules 2019-02-23 03:25:51 +09:00

Examples of go-prompt

This directory includes some examples using go-prompt. These examples are useful to know the usage of go-prompt and check behavior for development.

simple-echo

simple-input

A simple echo example using prompt.Input.

http-prompt

http-prompt

A simple http-prompt implementation using go-prompt in less than 200 lines of Go.

live-prefix

live-prefix

A example application which changes a prefix string dynamically. This feature is used like ktr0731/evans which is interactive gRPC client using go-prompt.

exec-command

Run another CLI tool via os/exec package. More practical example is a source code of kube-prompt. I recommend you to look this if you want to create tools like kube-prompt.