Created
February 18, 2020 18:11
-
-
Save perillo/c5b3bdff9e8db9c89f316670d129c0dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkglist/pkg.go b/pkglist/pkg.go | |
index 20af427..b11d9f0 100644 | |
--- a/pkglist/pkg.go | |
+++ b/pkglist/pkg.go | |
@@ -9,7 +9,7 @@ | |
package pkglist | |
import ( | |
- "github.com/perillo/gocmd/modlist" | |
+ mod "github.com/perillo/gocmd/modlist" | |
) | |
// For the actual definition of Package, see | |
@@ -25,25 +25,25 @@ import ( | |
// absolute paths referring to cached copies of generated Go source files. | |
// Although they are Go source files, the paths may not end in ".go". | |
type Package struct { | |
- Dir string `json:",omitempty"` // directory containing package sources | |
- ImportPath string `json:",omitempty"` // import path of package in dir | |
- ImportComment string `json:",omitempty"` // path in import comment on package statement | |
- Name string `json:",omitempty"` // package name | |
- Doc string `json:",omitempty"` // package documentation string | |
- Target string `json:",omitempty"` // install path | |
- Shlib string `json:",omitempty"` // the shared library that contains this package (only set when -linkshared) | |
- Goroot bool `json:",omitempty"` // is this package in the Go root? | |
- Standard bool `json:",omitempty"` // is this package part of the standard Go library? | |
- Stale bool `json:",omitempty"` // would 'go install' do anything for this package? | |
- StaleReason string `json:",omitempty"` // explanation for Stale==true | |
- Root string `json:",omitempty"` // Go root or Go path dir containing this package | |
- ConflictDir string `json:",omitempty"` // this directory shadows Dir in $GOPATH | |
- BinaryOnly bool `json:",omitempty"` // binary-only package (no longer supported) | |
- ForTest string `json:",omitempty"` // package is only for use in named test | |
- Export string `json:",omitempty"` // file containing export data (when using -export) | |
- Module *Module `json:",omitempty"` // info about package's containing module, if any (can be nil) | |
- Match []string `json:",omitempty"` // command-line patterns matching this package | |
- DepOnly bool `json:",omitempty"` // package is only a dependency, not explicitly listed | |
+ Dir string `json:",omitempty"` // directory containing package sources | |
+ ImportPath string `json:",omitempty"` // import path of package in dir | |
+ ImportComment string `json:",omitempty"` // path in import comment on package statement | |
+ Name string `json:",omitempty"` // package name | |
+ Doc string `json:",omitempty"` // package documentation string | |
+ Target string `json:",omitempty"` // install path | |
+ Shlib string `json:",omitempty"` // the shared library that contains this package (only set when -linkshared) | |
+ Goroot bool `json:",omitempty"` // is this package in the Go root? | |
+ Standard bool `json:",omitempty"` // is this package part of the standard Go library? | |
+ Stale bool `json:",omitempty"` // would 'go install' do anything for this package? | |
+ StaleReason string `json:",omitempty"` // explanation for Stale==true | |
+ Root string `json:",omitempty"` // Go root or Go path dir containing this package | |
+ ConflictDir string `json:",omitempty"` // this directory shadows Dir in $GOPATH | |
+ BinaryOnly bool `json:",omitempty"` // binary-only package (no longer supported) | |
+ ForTest string `json:",omitempty"` // package is only for use in named test | |
+ Export string `json:",omitempty"` // file containing export data (when using -export) | |
+ Module *mod.Module `json:",omitempty"` // info about package's containing module, if any (can be nil) | |
+ Match []string `json:",omitempty"` // command-line patterns matching this package | |
+ DepOnly bool `json:",omitempty"` // package is only a dependency, not explicitly listed | |
// Source files | |
GoFiles []string `json:",omitempty"` // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles) | |
@@ -123,9 +123,6 @@ func (pe *PackageError) Error() string { | |
return pe.Err | |
} | |
-// Module represents a module. | |
-type Module = modlist.Module | |
- | |
// concat concatenates args into a single []string. | |
func concat(args ...[]string) []string { | |
var buf []string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment