publish ch1/...

This commit is contained in:
Alan Donovan
2015-10-16 09:12:59 -04:00
parent a99e98f589
commit 1d9c5ef8e2
13 changed files with 472 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
// Copyright © 2016 Alan A. A. Donovan & Brian W. Kernighan.
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
// See page 6.
//!+
// Echo2 prints its command-line arguments.
package main
import (
"fmt"
"os"
)
func main() {
s, sep := "", ""
for _, arg := range os.Args[1:] {
s += sep + arg
sep = " "
}
fmt.Println(s)
}
//!-