aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/gobuild/gobuild.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gobuild/gobuild.go')
-rw-r--r--src/cmd/gobuild/gobuild.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/gobuild/gobuild.go b/src/cmd/gobuild/gobuild.go
index a6497425cc..6dce9d576f 100644
--- a/src/cmd/gobuild/gobuild.go
+++ b/src/cmd/gobuild/gobuild.go
@@ -111,13 +111,13 @@ func (a FileArray) Swap(i, j int) {
// If current directory is under $GOROOT/src/pkg, return the
// path relative to there. Otherwise return "".
func PkgDir() string {
- goroot, err := os.Getenv("GOROOT");
- if err != nil || goroot == "" {
+ goroot := os.Getenv("GOROOT");
+ if goroot == "" {
return ""
}
srcroot := path.Clean(goroot + "/src/pkg/");
- pwd, err1 := os.Getenv("PWD"); // TODO(rsc): real pwd
- if err1 != nil || pwd == "" {
+ pwd := os.Getenv("PWD"); // TODO(rsc): real pwd
+ if pwd == "" {
return ""
}
if pwd == srcroot {