Skip to content
This repository has been archived by the owner. It is now read-only.
Finds all packages in all of the GOPATH trees (library functionality similar to `go list all`)
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
testdata/src
LICENSE
README.md
pkgs.go
pkgs_test.go

README.md

go-pkgs

xrefs funcs top func library users

Package pkgs finds all packages in all of the GOPATH trees. It is library functionality equivalent to go list all (see go help packages for more info).

Much of the code was adapted from the cmd/go matchPackages func.

Docs: go-pkgs on Sourcegraph

Installation

go get github.com/sourcegraph/go-pkgs

Example Usage

import (
    "github.com/sourcegraph/go-pkgs"
    "go/build
)

// List all packages in all GOPATH trees.
pkglist, err := pkgs.FindAll("", build.Default, 0)
You can’t perform that action at this time.