Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1185 from sdboyer/improve-GOPATH-err
Browse files Browse the repository at this point in the history
ctx: improve "not under GOPATH" errors
  • Loading branch information
sdboyer committed Sep 19, 2017
2 parents 10ef770 + 2c2fb85 commit 5e004f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (c *Ctx) detectGOPATH(path string) (string, error) {
return gp, nil
}
}
return "", errors.Errorf("%s is not within a known GOPATH", path)
return "", errors.Errorf("%s is not within a known GOPATH/src", path)
}

// ImportForAbs returns the import path for an absolute project path by trimming the
Expand All @@ -244,7 +244,7 @@ func (c *Ctx) ImportForAbs(path string) (string, error) {
return filepath.ToSlash(path[len(srcprefix):]), nil
}

return "", errors.Errorf("%s not in GOPATH", path)
return "", errors.Errorf("%s is not within any GOPATH/src", path)
}

// AbsForImport returns the absolute path for the project root
Expand Down

0 comments on commit 5e004f4

Please sign in to comment.