GO-LIST(1) | General Commands Manual | GO-LIST(1) |
go - tool for managing Go source code
go list [-e] [-f format] [-json] [ packages ]
List lists the packages named by the import paths, one per line.
The default output shows the package import path:
code.google.com/p/google-api-go-client/books/v1 code.google.com/p/goauth2/oauth code.google.com/p/sqlite
type Package struct { Dir string // directory containing package sources ImportPath string // import path of package in dir Name string // package name Doc string // package documentation string Target string // install path Goroot bool // is this package in the Go root? Standard bool // is this package part of the standard Go library? Stale bool // would 'go install' do anything for this package? Root string // Go root or Go path dir containing this package // Source files GoFiles []string // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles) CgoFiles []string // .go sources files that import "C" CFiles []string // .c source files HFiles []string // .h source files SFiles []string // .s source files SysoFiles []string // .syso object files to add to archive // Cgo directives CgoCFLAGS []string // cgo: flags for C compiler CgoLDFLAGS []string // cgo: flags for linker CgoPkgConfig []string // cgo: pkg-config names // Dependency information Imports []string // import paths used by this package Deps []string // all (recursively) imported dependencies // Error information Incomplete bool // this package or a dependency has an error Error *PackageError // error loading package DepsErrors []*PackageError // errors loading dependencies TestGoFiles []string // _test.go files in package TestImports []string // imports from TestGoFiles XTestGoFiles []string // _test.go files outside package XTestImports []string // imports from XTestGoFiles }
For more about specifying packages, see go-packages(7).
This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others).
2012-05-13 |