Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/kylelemons/godebug
Have you ever wanted to get a pretty-printed version of a Go data structure, complete with indentation? I have found this especially useful in unit tests and in debugging my code, and thus godebug was born!
By default, pretty will write out a very compact representation of a data structure. From the Print example:
{Name: "Spaceship Heart of Gold",
Crew: {Arthur Dent: "Along for the Ride",
Ford Prefect: "A Hoopy Frood",
Trillian: "Human",
Zaphod Beeblebrox: "Galactic President"},
Androids: 1,
Stolen: true}
It can also produce a much more verbose, one-item-per-line representation suitable for computing diffs. See the documentation for more examples and customization.
Documentation for this package is available at godoc.org:
These packages are available via go get
:
$ go get -u github.com/kylelemons/godebug/{pretty,diff}
If godebug/pretty
is not granular enough, I highly recommend
checking out cmp or go-spew.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.