about use go language write a spider
I using go language to write a spider,but,I not quite understand Go's
goroutine.
such:
spider program clawing to web page, fetch all links and put links to a
like queue struct. goroutine get a link from queue.
I thinking, create a "queue"(such as container/list package) saving links.
Channel just to send complete message to "main thread" and exit.
can use channel saving links?
Thank's all.
No comments:
Post a Comment