diff options
| author | jet2tlf <jet2tlf@gmail.com> | 2024-05-31 03:31:15 +0000 |
|---|---|---|
| committer | jet2tlf <jet2tlf@gmail.com> | 2024-05-31 03:31:15 +0000 |
| commit | 9dc8f49cf8651c7976624417c427bc6d4bcc5048 (patch) | |
| tree | 54e2ffb9676705e2d6cf6d01cab891de2df617a8 | |
| parent | 4f68d64bea5f57eb7fd433c9f3a8c97b28fc1097 (diff) | |
| download | shell-go-9dc8f49cf8651c7976624417c427bc6d4bcc5048.tar.gz shell-go-9dc8f49cf8651c7976624417c427bc6d4bcc5048.zip | |
pass 5st stage
| -rw-r--r-- | cmd/myshell/main.go | 5 |
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 } } } |