Update ch5-04-1.md

翻译错误。
pull/50/head
wukoo 2018-01-01 16:43:56 +08:00 committed by GitHub
parent d493b63b5e
commit 3f8f4a0531
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ if err != nil{
}
```
当对html.Parse的调用失败时findLinks不会直接返回html.Parse的错误因为缺少两条重要信息1、错误发生在解析器2、url已经被解析。这些信息有助于错误的处理findLinks会构造新的错误信息返回给调用者
当对html.Parse的调用失败时findLinks不会直接返回html.Parse的错误因为缺少两条重要信息1、发生错误时的解析器html parser2、发生错误的url。因此findLinks构造了一个新的错误信息既包含了这两项也包括了底层的解析出错的信息。
```Go
doc, err := html.Parse(resp.Body)