Fix http-prompt example (no exit)

Implement the exit function on the http-prompt example.
This commit is contained in:
David Garaña 2019-06-28 12:28:00 +02:00
parent 723478af40
commit 25ab56b982

View File

@ -105,6 +105,9 @@ func executor(in string) {
var method, body string
blocks := strings.Split(in, " ")
switch blocks[0] {
case "exit":
fmt.Println("Bye!")
os.Exit(0)
case "cd":
if len(blocks) < 2 {
ctx.url.Path = "/"