]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: clarify Context.HasSubdir docs
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 9 Dec 2016 04:08:32 +0000 (04:08 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 9 Dec 2016 05:09:13 +0000 (05:09 +0000)
Fixes #17888

Change-Id: I7490b95a03b810a0f7ed1f07f37d7c7b3ac036be
Reviewed-on: https://go-review.googlesource.com/34240
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/go/build/build.go

index f6aabcb3af7bf121f5da7531765d4df63a954bd3..ea37bbbcb503c3b3e2d6ea111c5d2783a35a454d 100644 (file)
@@ -76,8 +76,9 @@ type Context struct {
        // If IsDir is nil, Import calls os.Stat and uses the result's IsDir method.
        IsDir func(path string) bool
 
-       // HasSubdir reports whether dir is a subdirectory of
-       // (perhaps multiple levels below) root.
+       // HasSubdir reports whether dir is lexically a subdirectory of
+       // root, perhaps multiple levels below. It does not try to check
+       // whether dir exists.
        // If so, HasSubdir sets rel to a slash-separated path that
        // can be joined to root to produce a path equivalent to dir.
        // If HasSubdir is nil, Import uses an implementation built on