This commit is contained in:
huangsimin 2018-12-19 18:32:06 +08:00
parent d4540c5e90
commit da18e3e22d

View File

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