gopl-zh.github.com/vendor/gopl.io/ch1/echo3/main.go

21 lines
308 B
Go
Raw Normal View History

2015-12-09 07:45:11 +00:00
// 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:], " "))
}
//!-