From: Bryan C. Mills Date: Thu, 8 Nov 2018 15:23:53 +0000 (-0500) Subject: cmd/go/internal/modfetch: document DownloadDir X-Git-Tag: go1.12beta1~218 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c37b6ecc8ae90fad4c3bde947d96487820cdceec;p=gostls13.git cmd/go/internal/modfetch: document DownloadDir Change-Id: I4717964234fca0c8c5889ed710b66f39eb53a809 Reviewed-on: https://go-review.googlesource.com/c/151562 Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot Reviewed-by: Russ Cox --- diff --git a/src/cmd/go/internal/modfetch/cache.go b/src/cmd/go/internal/modfetch/cache.go index 80484d5b5e..1ccd43dc2a 100644 --- a/src/cmd/go/internal/modfetch/cache.go +++ b/src/cmd/go/internal/modfetch/cache.go @@ -56,6 +56,8 @@ func CachePath(m module.Version, suffix string) (string, error) { return filepath.Join(dir, encVer+"."+suffix), nil } +// DownloadDir returns the directory to which m should be downloaded. +// Note that the directory may not yet exist. func DownloadDir(m module.Version) (string, error) { if PkgMod == "" { return "", fmt.Errorf("internal error: modfetch.PkgMod not set")