]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: fix initialization issue
authorRobert Griesemer <gri@golang.org>
Tue, 16 Feb 2010 19:54:12 +0000 (11:54 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 16 Feb 2010 19:54:12 +0000 (11:54 -0800)
R=rsc
CC=golang-dev
https://golang.org/cl/207111

src/cmd/godoc/godoc.go
src/cmd/godoc/main.go

index 9cc194435e5a0298ac11820c957034f11d870ff4..176e33949fa20abc38b230dff6614dd82401e898 100644 (file)
@@ -100,7 +100,7 @@ var (
 )
 
 
-func initRoots() {
+func init() {
        goroot = os.Getenv("GOROOT")
        if goroot == "" {
                goroot = pathutil.Join(os.Getenv("HOME"), "go")
index ef08551ce7ee4d13ad595e498f590524a2b45d00..4bff23f0dfd60d7fca06321201435dd249832ebb 100644 (file)
@@ -152,7 +152,6 @@ func main() {
                log.Exitf("negative tabwidth %d", *tabwidth)
        }
 
-       initRoots()
        readTemplates()
 
        if *httpaddr != "" {