ch2: fix code path

This commit is contained in:
chai2010
2016-01-20 23:16:19 +08:00
parent 442dd58ee4
commit 7fe7a309be
7 changed files with 41 additions and 51 deletions

View File

@@ -59,8 +59,8 @@ fmt.Println(incr(&v)) // "3" (and v is 3)
指針是實現標準庫中flag包的關鍵技術它使用命令行參數來設置對應變量的值而這些對應命令行標誌參數的變量可能會零散分布在整個程序中。爲了説明這一點在早些的echo版本中就包含了兩個可選的命令行參數`-n`用於忽略行尾的換行符,`-s sep`用於指定分隔字符默認是空格。下面這是第四個版本對應包路徑爲gopl.io/ch2/echo4。
<u><i>gopl.io/ch2/echo4</i></u>
```Go
gopl.io/ch2/echo4
// Echo4 prints its command-line arguments.
package main
@@ -102,4 +102,3 @@ Usage of ./echo4:
-s string
separator (default " ")
```