Skip to content

Commit b7e8f89

Browse files
urandom2matloob
authored andcommitted
go/packages: rename golistDriverCurrent to golistDriver
This fixes a naming preference missed in CL 166537. Since func golistDriverCurrent is no longer polymorphic, it was suggested we simply call it golistDriver. Change-Id: Ibf517365c20953628ede3457b9247efd8b79897c Reviewed-on: https://go-review.googlesource.com/c/tools/+/168837 Run-TryBot: Michael Matloob <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
1 parent 4c644d7 commit b7e8f89

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

go/packages/golist.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ extractQueries:
128128
// patterns also requires a go list call, since it's the equivalent of
129129
// ".".
130130
if len(restPatterns) > 0 || len(patterns) == 0 {
131-
dr, err := golistDriverCurrent(cfg, restPatterns...)
131+
dr, err := golistDriver(cfg, restPatterns...)
132132
if err != nil {
133133
return nil, err
134134
}
@@ -147,13 +147,13 @@ extractQueries:
147147
var containsCandidates []string
148148

149149
if len(containFiles) != 0 {
150-
if err := runContainsQueries(cfg, golistDriverCurrent, response, containFiles); err != nil {
150+
if err := runContainsQueries(cfg, golistDriver, response, containFiles); err != nil {
151151
return nil, err
152152
}
153153
}
154154

155155
if len(packagesNamed) != 0 {
156-
if err := runNamedQueries(cfg, golistDriverCurrent, response, packagesNamed); err != nil {
156+
if err := runNamedQueries(cfg, golistDriver, response, packagesNamed); err != nil {
157157
return nil, err
158158
}
159159
}
@@ -168,7 +168,7 @@ extractQueries:
168168
}
169169

170170
if len(needPkgs) > 0 {
171-
addNeededOverlayPackages(cfg, golistDriverCurrent, response, needPkgs)
171+
addNeededOverlayPackages(cfg, golistDriver, response, needPkgs)
172172
if err != nil {
173173
return nil, err
174174
}
@@ -540,10 +540,10 @@ func otherFiles(p *jsonPackage) [][]string {
540540
return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles}
541541
}
542542

543-
// golistDriverCurrent uses the "go list" command to expand the
544-
// pattern words and return metadata for the specified packages.
545-
// dir may be "" and env may be nil, as per os/exec.Command.
546-
func golistDriverCurrent(cfg *Config, words ...string) (*driverResponse, error) {
543+
// golistDriver uses the "go list" command to expand the pattern
544+
// words and return metadata for the specified packages. dir may be
545+
// "" and env may be nil, as per os/exec.Command.
546+
func golistDriver(cfg *Config, words ...string) (*driverResponse, error) {
547547
// go list uses the following identifiers in ImportPath and Imports:
548548
//
549549
// "p" -- importable package or main (command)

0 commit comments

Comments
 (0)