aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/myshell/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/myshell/main.go b/cmd/myshell/main.go
index f9ca0ee..99239ad 100644
--- a/cmd/myshell/main.go
+++ b/cmd/myshell/main.go
@@ -17,6 +17,11 @@ func main() {
fmt.Println(err.Error())
}
+ switch in {
+ case "exit\n":
+ os.Exit(0)
+ }
+
fmt.Printf("%s: command not found\n", strings.TrimRight(in, "\n"))
}
}