Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
github.com/moovweb/gokogiri
By Zhigang Chen and Hampton Catlin
This is a major rewrite from v0 in the following places:
# Linux
sudo apt-get install libxml2-dev
# Mac
brew install libxml2
go get github.com/moovweb/gokogiri
go test github.com/moovweb/gokogiri/...
package main
import (
"net/http"
"io/ioutil"
"github.com/moovweb/gokogiri"
)
func main() {
// fetch and read a web page
resp, _ := http.Get("http://www.google.com")
page, _ := ioutil.ReadAll(resp.Body)
// parse the web page
doc, _ := gokogiri.ParseHtml(page)
// perform operations on the parsed page -- consult the tests for examples
// important -- don't forget to free the resources when you're done!
doc.Free()
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.