See more information from about page of my blog
ohyee / blotter Goto Github PK
View Code? Open in Web Editor NEWGolang blog backend
Golang blog backend
See more information from about page of my blog
处理请求的时候好像没使用go原生的context,为啥?用这个HttpContext是因为能带更多信息?
// HTTPContext context of a api call
type HTTPContext struct {
Request *http.Request
Response http.ResponseWriter
buf *bytes.Buffer
header []httpHeader
user *user.TypeDB
userGot bool
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xc1032d]
goroutine 22 [running]:
github.com/chromedp/chromedp.initContextBrowser({0x1f0b0c8, 0xc00007ba40})
/go/pkg/mod/github.com/chromedp/[email protected]/chromedp.go:253 +0xcd
github.com/chromedp/chromedp.Run({0x1f0b0c8, 0xc00007ba40}, {0xc000a89cc0, 0x2, 0x2})
/go/pkg/mod/github.com/chromedp/[email protected]/chromedp.go:265 +0x36
github.com/OhYee/blotter/cron/spider.getHTMLWithJS({0xc0010fcf20, 0x1e})
/data/blotter/cron/spider/request.go:108 +0x645
github.com/OhYee/blotter/cron/spider.Do({0xc0010fcf20, 0xc000a89e98}, 0x1)
/data/blotter/cron/spider/spider.go:23 +0x94
github.com/OhYee/blotter/cron.spiderSite({{{0xc000e3a9f0, 0x17}, {0xc0011456f0, 0x6}}, {0xc0015df050, 0x2d}, {0xc0015df080, 0x24}, {0xc0010fcf20, 0x1e}, ...}, ...)
/data/blotter/cron/spider.go:29 +0x23a
github.com/OhYee/blotter/cron.Spider.func1.1()
/data/blotter/cron/spider.go:117 +0x58
github.com/OhYee/blotter/utils/goroutine_pool.(*Pool).Thread(0xc00006bcc0)
/data/blotter/utils/goroutine_pool/pool.go:29 +0x3d
created by github.com/OhYee/blotter/utils/goroutine_pool.New
/data/blotter/utils/goroutine_pool/pool.go:19 +0x72
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.