diff --git a/ch1/echo1.go b/ch1/echo1.go new file mode 100644 index 0000000..3b0324f --- /dev/null +++ b/ch1/echo1.go @@ -0,0 +1,17 @@ +package main + +import ( + "fmt" + "os" +) + +func main() { + var s, sep string + + for i := 1; i < len(os.Args); i++ { + s += sep + os.Args[i] + sep = "|" + } + + fmt.Println(s) +} \ No newline at end of file