aboutsummaryrefslogtreecommitdiff
path: root/cmd/myshell/main.go
diff options
context:
space:
mode:
authorjet2tlf <jet2tlf@gmail.com>2024-05-31 03:31:15 +0000
committerjet2tlf <jet2tlf@gmail.com>2024-05-31 03:31:15 +0000
commit9dc8f49cf8651c7976624417c427bc6d4bcc5048 (patch)
tree54e2ffb9676705e2d6cf6d01cab891de2df617a8 /cmd/myshell/main.go
parent4f68d64bea5f57eb7fd433c9f3a8c97b28fc1097 (diff)
downloadshell-go-9dc8f49cf8651c7976624417c427bc6d4bcc5048.tar.gz
shell-go-9dc8f49cf8651c7976624417c427bc6d4bcc5048.zip
pass 5st stage
Diffstat (limited to 'cmd/myshell/main.go')
-rw-r--r--cmd/myshell/main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/myshell/main.go b/cmd/myshell/main.go
index ee725a2..84f1b23 100644
--- a/cmd/myshell/main.go
+++ b/cmd/myshell/main.go
@@ -29,13 +29,10 @@ func main() {
fmt.Println(err.Error())
}
os.Exit(code)
- return
case "echo":
- fmt.Println(os.Stdout, "%s\n", strings.Join(commands[1:], " "))
- return
+ fmt.Printf("%s\n", strings.Join(commands[1:], " "))
default:
fmt.Printf("%s: command not found\n", commands[0])
- return
}
}
}