diff --git a/parser_test.go b/parser_test.go index 7ab3aeb..9252bad 100644 --- a/parser_test.go +++ b/parser_test.go @@ -32,8 +32,8 @@ func (tt *Toutiao) GetSpiderID() int { func (tt *Toutiao) ToDoParser(adstring string) (presult string, err error) { defer func() { - if err = recover().(error); err != nil { - log.Println(err) + if ierr := recover(); ierr != nil { + log.Println(ierr) } }()