It looks like Go doesn't support HTML web parsing tools/packages yet, despite it already providing XML scraping via encoding/xml
. So how can I install exp/html
package in Go?
As far as I know, all the answers, at least I stumbled upon on the Web with 10 minutes worth of searching, didn't return the correct answer; when I tried to run those, I got the error cannot find package XXX in YYY
or no Go source files in XXX
.
So as of now, can I install it without re-compling and setting the whole Go environment from scratch? Or am I missing something?
I'm on OS X 10.8 and run Go version 1.1, which I installed from OS X package installer.
For your information, these code didn't make it.
go get code.google.com/p/go/src/pkg/exp/html
go get code.google.com/p/go.exp/inotify
Thanks.
I just tried:
go get code.google.com/p/go.net/html
and it seemed to work.
I have a feeling it's been moved from the exp
library to the new net
library.
EDIT: Documentation & browseable repo.
With go 1.4 (November 9th, 2014), you will have to type:
go get golang.org/x/net/html
See: