ch12: fix code path

This commit is contained in:
chai2010
2016-01-20 22:56:40 +08:00
parent 617ef87432
commit 0c1b9762d9
7 changed files with 7 additions and 32 deletions

View File

@@ -21,9 +21,8 @@ foo symbol (an unquoted name)
編碼是由一個encode遞歸函數完成如下所示。它的結構本質上和前面的Display函數類似
<u><i>gopl.io/ch12/sexpr</i></u>
```Go
gopl.io/ch12/sexpr
func encode(buf *bytes.Buffer, v reflect.Value) error {
switch v.Kind() {
case reflect.Invalid:
@@ -151,5 +150,3 @@ omin.)" "Best Picture (Nomin.)")) (Sequel nil))
**練習 12.6** 脩改encode作爲一個優化忽略對是零值對象的編碼。
**練習 12.7** 創建一個基於流式的API用於S表達式的解碼和json.Decoder(§4.5)函數功能類似。