mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2024-11-24 23:29:01 +00:00
21 lines
308 B
Go
21 lines
308 B
Go
|
// 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:], " "))
|
||
|
}
|
||
|
|
||
|
//!-
|