A Go Package that grabs information about Go Packages ?

PkgGo is Package that has many useful functions on obtaining various information about Go Packages through This is actually my first “real” project with Golang, so do not use this for production purposes (for now).


  • Query Go Package information
  • Get’s the number of packages returned (max 50)
  • Get the Package link

The Project is still in it’s early stages. Many features are still missing


PkgGo requires Golang. Developed on v1.19

Assuming you already have a mod file; In your current project, run:

go get

If PkgGo was recently updated, and the command above is not installing the correct version, try setting your GOPROXY environment variable to “direct” (You can thank google for that)


Currently PkgGo only has 2 functions:


PackageLink(PackageName) - []string Returns an array of the top 5 query results. Example:

s := PkgGo.PackageLink("fmt")


PackageCount(PackageName) - int Returns an integer of number of packages that came back from the query (max 50) Example:

s := PkgGo.PackageCount("fmt")

Note: The query is capped at 50, if this function returns back 50, good chances are it’s more than that.


Nothing the user has to worry about, however it should be noted that PkgGo uses goquery for pretty much every function. Goquery can be found here.


  • Make PackageLink more customizable (change how many results are returned)
  • Grab package data, such as descriptions, versions, etc
  • There’s probably more, just can’t think of anything else right now.


I call it the “Do what you want” License. Do whatever you want to do with my code, I do not mind.


View Github