File tree 1 file changed +14
-0
lines changed 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,20 @@ func main() {
124
124
fmt .Fprintf (os .Stderr , "go: cannot find GOROOT directory: %v\n " , cfg .GOROOT )
125
125
os .Exit (2 )
126
126
}
127
+ switch strings .ToLower (cfg .GOROOT ) {
128
+ case "/usr/local/go" : // Location recommended for installation on Linux and Darwin and used by Mac installer.
129
+ telemetry .Inc ("go/goroot:usr-local-go" )
130
+ case "/usr/lib/go" : // A typical location used by Linux package managers.
131
+ telemetry .Inc ("go/goroot:usr-lib-go" )
132
+ case "/usr/lib/golang" : // Another typical location used by Linux package managers.
133
+ telemetry .Inc ("go/goroot:usr-lib-golang" )
134
+ case `c:\program files\go` : // Location used by Windows installer.
135
+ telemetry .Inc ("go/goroot:program-files-go" )
136
+ case `c:\program files (x86)\go` : // Location used by 386 Windows installer on amd64 platform.
137
+ telemetry .Inc ("go/goroot:program-files-x86-go" )
138
+ default :
139
+ telemetry .Inc ("go/goroot:other" )
140
+ }
127
141
128
142
// Diagnose common mistake: GOPATH==GOROOT.
129
143
// This setting is equivalent to not setting GOPATH at all,
You can’t perform that action at this time.
0 commit comments