Fix http-prompt example (no exit)
Implement the exit function on the http-prompt example.
This commit is contained in:
parent
723478af40
commit
25ab56b982
|
@ -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 = "/"
|
||||
|
|
Loading…
Reference in New Issue