From 25ab56b982635230e00bbbfc48a4069eb25b49d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gara=C3=B1a?= Date: Fri, 28 Jun 2019 12:28:00 +0200 Subject: [PATCH] Fix http-prompt example (no exit) Implement the exit function on the http-prompt example. --- _example/http-prompt/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_example/http-prompt/main.go b/_example/http-prompt/main.go index 7c16e2d..b372a35 100644 --- a/_example/http-prompt/main.go +++ b/_example/http-prompt/main.go @@ -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 = "/"