diff --git a/parser_test.go b/parser_test.go index 21f8a3a..24fd08d 100644 --- a/parser_test.go +++ b/parser_test.go @@ -2,6 +2,7 @@ package parser import ( "encoding/json" + "errors" "log" "testing" ) @@ -29,10 +30,10 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) { log.Println(adparser) data, err := adparser.ToJSON() if err != nil { - panic(err) + return "", err } - log.Println(string(data)) - return "", nil + // log.Println(string(data)) + return string(data), errors.New("fuck test") } func TestParserToutiao(t *testing.T) {