tophubs / TopList

今日热榜,一个获取各大热门网站热门头条的聚合网站,使用Go语言编写,多协程异步快速抓取信息,预览:https://mo.fish
Apache License 2.0
4.69k stars 951 forks source link

console error when open page http://localhost:9090/ #41

Closed yrong closed 5 years ago

yrong commented 5 years ago

`go.mod module github.com/tophubs/TopList

go 1.13

require ( github.com/BurntSushi/toml v0.3.1 github.com/PuerkitoBio/goquery v1.5.0 github.com/bitly/go-simplejson v0.5.0 github.com/go-sql-driver/mysql v1.4.1 golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect golang.org/x/text v0.3.2 google.golang.org/appengine v1.6.2 // indirect ) `

2019/09/07 18:50:37 err 2019/09/07 18:50:37 http: panic serving 127.0.0.1:38404: runtime error: invalid memory address or nil pointer dereference goroutine 19 [running]: net/http.(conn).serve.func1(0xc0001c2000) /ssd/go-1.13/src/net/http/server.go:1767 +0x149 panic(0x965020, 0xd15470) /ssd/go-1.13/src/runtime/panic.go:679 +0x1e0 text/template.errRecover(0xc00009b728) /ssd/go-1.13/src/text/template/exec.go:164 +0x30d panic(0x965020, 0xd15470) /ssd/go-1.13/src/runtime/panic.go:679 +0x1e0 text/template.(Template).execute(0x0, 0xa60680, 0xc00018e1c0, 0x95b7e0, 0xd3f3b0, 0x0, 0x0) /ssd/go-1.13/src/text/template/exec.go:218 +0x303 text/template.(Template).Execute(0x0, 0xa60680, 0xc00018e1c0, 0x95b7e0, 0xd3f3b0, 0x0, 0x0) /ssd/go-1.13/src/text/template/exec.go:204 +0x5e main.main.func1(0xa669c0, 0xc00018e1c0, 0xc000132200) /ssd/mygo/TopList/App/Server.go:74 +0x1e5 net/http.HandlerFunc.ServeHTTP(0x9f9d28, 0xa669c0, 0xc00018e1c0, 0xc000132200) /ssd/go-1.13/src/net/http/server.go:2007 +0x44 net/http.(ServeMux).ServeHTTP(0xd229e0, 0xa669c0, 0xc00018e1c0, 0xc000132200) /ssd/go-1.13/src/net/http/server.go:2387 +0x1a6 net/http.serverHandler.ServeHTTP(0xc0000fc000, 0xa669c0, 0xc00018e1c0, 0xc000132200) /ssd/go-1.13/src/net/http/server.go:2802 +0x20f net/http.(conn).serve(0xc0001c2000, 0xa67540, 0xc00011c200) /ssd/go-1.13/src/net/http/server.go:1890 +0x1716 created by net/http.(Server).Serve /ssd/go-1.13/src/net/http/server.go:2927 +0x911 2019/09/07 18:50:37 err 2019/09/07 18:50:37 http: panic serving 127.0.0.1:38406: runtime error: invalid memory address or nil pointer dereference goroutine 20 [running]: net/http.(conn).serve.func1(0xc0001c20a0) /ssd/go-1.13/src/net/http/server.go:1767 +0x149 panic(0x965020, 0xd15470) /ssd/go-1.13/src/runtime/panic.go:679 +0x1e0 text/template.errRecover(0xc000099728) /ssd/go-1.13/src/text/template/exec.go:164 +0x30d panic(0x965020, 0xd15470) /ssd/go-1.13/src/runtime/panic.go:679 +0x1e0 text/template.(Template).execute(0x0, 0xa60680, 0xc0000fc0e0, 0x95b7e0, 0xd3f3b0, 0x0, 0x0) /ssd/go-1.13/src/text/template/exec.go:218 +0x303 text/template.(Template).Execute(0x0, 0xa60680, 0xc0000fc0e0, 0x95b7e0, 0xd3f3b0, 0x0, 0x0) /ssd/go-1.13/src/text/template/exec.go:204 +0x5e main.main.func1(0xa669c0, 0xc0000fc0e0, 0xc000132100) /ssd/mygo/TopList/App/Server.go:74 +0x1e5 net/http.HandlerFunc.ServeHTTP(0x9f9d28, 0xa669c0, 0xc0000fc0e0, 0xc000132100) /ssd/go-1.13/src/net/http/server.go:2007 +0x44 net/http.(ServeMux).ServeHTTP(0xd229e0, 0xa669c0, 0xc0000fc0e0, 0xc000132100) /ssd/go-1.13/src/net/http/server.go:2387 +0x1a6 net/http.serverHandler.ServeHTTP(0xc0000fc000, 0xa669c0, 0xc0000fc0e0, 0xc000132100) /ssd/go-1.13/src/net/http/server.go:2802 +0x20f net/http.(conn).serve(0xc0001c20a0, 0xa67540, 0xc00011c180) /ssd/go-1.13/src/net/http/server.go:1890 +0x1716 created by net/http.(Server).Serve /ssd/go-1.13/src/net/http/server.go:2927 +0x911 2019/09/07 18:50:38 err 2019/09/07 18:50:38 http: panic serving 127.0.0.1:38408: runtime error: invalid memory address or nil pointer dereference goroutine 11 [running]: net/http.(conn).serve.func1(0xc0000acdc0) /ssd/go-1.13/src/net/http/server.go:1767 +0x149 panic(0x965020, 0xd15470) /ssd/go-1.13/src/runtime/panic.go:679 +0x1e0 text/template.errRecover(0xc000099728) /ssd/go-1.13/src/text/template/exec.go:164 +0x30d panic(0x965020, 0xd15470) /ssd/go-1.13/src/runtime/panic.go:679 +0x1e0 text/template.(Template).execute(0x0, 0xa60680, 0xc0000fc1c0, 0x95b7e0, 0xd3f3b0, 0x0, 0x0) /ssd/go-1.13/src/text/template/exec.go:218 +0x303 text/template.(Template).Execute(0x0, 0xa60680, 0xc0000fc1c0, 0x95b7e0, 0xd3f3b0, 0x0, 0x0) /ssd/go-1.13/src/text/template/exec.go:204 +0x5e main.main.func1(0xa669c0, 0xc0000fc1c0, 0xc00015c100) /ssd/mygo/TopList/App/Server.go:74 +0x1e5 net/http.HandlerFunc.ServeHTTP(0x9f9d28, 0xa669c0, 0xc0000fc1c0, 0xc00015c100) /ssd/go-1.13/src/net/http/server.go:2007 +0x44 net/http.(ServeMux).ServeHTTP(0xd229e0, 0xa669c0, 0xc0000fc1c0, 0xc00015c100) /ssd/go-1.13/src/net/http/server.go:2387 +0x1a6 net/http.serverHandler.ServeHTTP(0xc0000fc000, 0xa669c0, 0xc0000fc1c0, 0xc00015c100) /ssd/go-1.13/src/net/http/server.go:2802 +0x20f net/http.(conn).serve(0xc0000acdc0, 0xa67540, 0xc000088580) /ssd/go-1.13/src/net/http/server.go:1890 +0x1716 created by net/http.(Server).Serve /ssd/go-1.13/src/net/http/server.go:2927 +0x911

yrong commented 5 years ago

not a bug, should run server in Directory App