1
0
mirror of https://github.com/golang/go synced 2024-11-18 12:54:44 -07:00

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:
Hyang-Ah (Hana) Kim 2016-02-21 18:54:27 +05:30 committed by Hyang-Ah Hana Kim
parent 3dafbd1ba4
commit 51464e57af

View File

@ -56,7 +56,6 @@ import (
"log" "log"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"sort" "sort"
"strings" "strings"
"sync" "sync"
@ -351,7 +350,7 @@ func Run(pta bool, result *Result) {
var roots, args []string // roots[i] ends with os.PathSeparator var roots, args []string // roots[i] ends with os.PathSeparator
// Enumerate packages in $GOROOT. // 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) roots = append(roots, root)
args = allPackages(root) args = allPackages(root)
log.Printf("GOROOT=%s: %s\n", root, args) log.Printf("GOROOT=%s: %s\n", root, args)