Any smart method to get exp/html back after Go1?

后端 未结 5 739
醉话见心
醉话见心 2020-12-10 08:33

I\'ve installed the Go release version as root. Go1 removed all exp/ code.

Is there smart method to get exp/* back after Go1? (I mean how to install in my local GOPA

5条回答
  •  青春惊慌失措
    2020-12-10 08:56

    The exp/html library was incomplete which is why it was removed for Go1.

    However if you really want to use it then

    go get code.google.com/p/go/src/pkg/exp/html
    

    may install it back for you. If you want a slightly more complete html parser then you might checkout http://code.google.com/p/go-html-transform/ as well it has an html5 parser as well as a css selector based scraping and transformation library.

    EDIT: Apparently trying to go get the package that way doesn't really work. It appears the only way to install this is to checkout the go source code and then install from source. This is actually a really quick an painless process if you want to go that route.

提交回复
热议问题