From 2c2fb85b399356498438683e7959dcfe3663fdd3 Mon Sep 17 00:00:00 2001 From: sam boyer Date: Tue, 19 Sep 2017 10:46:41 -0400 Subject: [PATCH] ctx: improve "not under GOPATH" errors --- context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context.go b/context.go index 9e862bc494..14b26b1853 100644 --- a/context.go +++ b/context.go @@ -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 @@ -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