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 <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Colin Arnott 2019-03-22 07:00:44 +00:00 committed by Michael Matloob
parent 4c644d7e32
commit b7e8f894e3
1 changed files with 8 additions and 8 deletions

View File

@ -128,7 +128,7 @@ extractQueries:
// patterns also requires a go list call, since it's the equivalent of // patterns also requires a go list call, since it's the equivalent of
// ".". // ".".
if len(restPatterns) > 0 || len(patterns) == 0 { if len(restPatterns) > 0 || len(patterns) == 0 {
dr, err := golistDriverCurrent(cfg, restPatterns...) dr, err := golistDriver(cfg, restPatterns...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -147,13 +147,13 @@ extractQueries:
var containsCandidates []string var containsCandidates []string
if len(containFiles) != 0 { if len(containFiles) != 0 {
if err := runContainsQueries(cfg, golistDriverCurrent, response, containFiles); err != nil { if err := runContainsQueries(cfg, golistDriver, response, containFiles); err != nil {
return nil, err return nil, err
} }
} }
if len(packagesNamed) != 0 { if len(packagesNamed) != 0 {
if err := runNamedQueries(cfg, golistDriverCurrent, response, packagesNamed); err != nil { if err := runNamedQueries(cfg, golistDriver, response, packagesNamed); err != nil {
return nil, err return nil, err
} }
} }
@ -168,7 +168,7 @@ extractQueries:
} }
if len(needPkgs) > 0 { if len(needPkgs) > 0 {
addNeededOverlayPackages(cfg, golistDriverCurrent, response, needPkgs) addNeededOverlayPackages(cfg, golistDriver, response, needPkgs)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -540,10 +540,10 @@ func otherFiles(p *jsonPackage) [][]string {
return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles} return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles}
} }
// golistDriverCurrent uses the "go list" command to expand the // golistDriver uses the "go list" command to expand the pattern
// pattern words and return metadata for the specified packages. // words and return metadata for the specified packages. dir may be
// dir may be "" and env may be nil, as per os/exec.Command. // "" and env may be nil, as per os/exec.Command.
func golistDriverCurrent(cfg *Config, words ...string) (*driverResponse, error) { func golistDriver(cfg *Config, words ...string) (*driverResponse, error) {
// go list uses the following identifiers in ImportPath and Imports: // go list uses the following identifiers in ImportPath and Imports:
// //
// "p" -- importable package or main (command) // "p" -- importable package or main (command)