1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:28:32 -06: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"
"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)