зеркало из https://github.com/golang/tools.git
godoc/analysis: use build.Default.GOROOT instead of runtime.GOROOT
Change-Id: Ic34744557c3fbddd27590303794d384e28ff1ae3 Reviewed-on: https://go-review.googlesource.com/19781 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Родитель
3dafbd1ba4
Коммит
51464e57af
|
@ -56,7 +56,6 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
|
@ -351,7 +350,7 @@ func Run(pta bool, result *Result) {
|
|||
var roots, args []string // roots[i] ends with os.PathSeparator
|
||||
|
||||
// Enumerate packages in $GOROOT.
|
||||
root := filepath.Join(runtime.GOROOT(), "src") + string(os.PathSeparator)
|
||||
root := filepath.Join(build.Default.GOROOT, "src") + string(os.PathSeparator)
|
||||
roots = append(roots, root)
|
||||
args = allPackages(root)
|
||||
log.Printf("GOROOT=%s: %s\n", root, args)
|
||||
|
|
Загрузка…
Ссылка в новой задаче