mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-09-13 07:02:16 +00:00
good good study, day day up!
This commit is contained in:
20
vendor/gopl.io/ch1/echo3/main.go
generated
vendored
Normal file
20
vendor/gopl.io/ch1/echo3/main.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright © 2016 Alan A. A. Donovan & Brian W. Kernighan.
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
|
||||
// See page 8.
|
||||
|
||||
// Echo3 prints its command-line arguments.
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//!+
|
||||
func main() {
|
||||
fmt.Println(strings.Join(os.Args[1:], " "))
|
||||
}
|
||||
|
||||
//!-
|
Reference in New Issue
Block a user