aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorjet2tlf <jet2tlf@gmail.com>2024-05-30 02:15:15 +0000
committerjet2tlf <jet2tlf@gmail.com>2024-05-30 02:15:15 +0000
commit55664ef02d18b032f2c142fe89833236c851002c (patch)
tree280797046277e3a324ff06732b095766b2b3444e /cmd
parent185561f7664ef453ba4d3bbd3d313b6c1867ac69 (diff)
downloadshell-go-55664ef02d18b032f2c142fe89833236c851002c.tar.gz
shell-go-55664ef02d18b032f2c142fe89833236c851002c.zip
pass 4st stage
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"))
}
}