Commit fdc047fb authored by Andrew Gerrand's avatar Andrew Gerrand

cmd/go: add ImportComment to Package struct

It seems reasonable that people might want to look up the
ImportComment with "go list".

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/143600043
parent dcc4a674
......@@ -387,6 +387,7 @@ syntax of package template. The default output is equivalent to -f
type Package struct {
Dir string // directory containing package sources
ImportPath string // import path of package in dir
ImportComment string // path in import comment on package statement
Name string // package name
Doc string // package documentation string
Target string // install path
......
......@@ -32,6 +32,7 @@ syntax of package template. The default output is equivalent to -f
type Package struct {
Dir string // directory containing package sources
ImportPath string // import path of package in dir
ImportComment string // path in import comment on package statement
Name string // package name
Doc string // package documentation string
Target string // install path
......
......@@ -28,6 +28,7 @@ type Package struct {
// remove existing ones. Keep in sync with list.go
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
......@@ -104,6 +105,7 @@ func (p *Package) copyBuild(pp *build.Package) {
p.Dir = pp.Dir
p.ImportPath = pp.ImportPath
p.ImportComment = pp.ImportComment
p.Name = pp.Name
p.Doc = pp.Doc
p.Root = pp.Root
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment