From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <9D4F9D2A-6522-4223-807B-0B8F0F6AF68D@lsub.org> Date: Mon, 18 Feb 2013 20:07:37 -0700 Message-ID: From: andrey mirtchovski To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] going too far? Topicbox-Message-UUID: 1aa7e8e2-ead8-11e9-9d60-3106f5b1d025 > The iostats wasn't particularly strange for that one, so I wonder if there's > something about nemo's example > that gets {go clean ...} wandering through all the src/cmd stuff so often. i just received this message an hour late. the answer is in the documentation ("go help packages"): "An import path that is a rooted path or that begins with a . or .. element is interpreted as a file system path and denotes the package in that directory. Otherwise, the import path P denotes the package found in the directory DIR/src/P for some DIR listed in the GOPATH environment variable (see 'go help gopath'). [snip] An import path is a pattern if it includes one or more "..." wildcards, each of which can match any string, including the empty string and strings containing slashes. Such a pattern expands to all package directories found in the GOPATH trees with names matching the patterns. As a special case, x/... matches x as well as x's subdirectories. For example, net/... expands to net and packages in its subdirectories." in essence, by not rooting the lsub.org subdir with a './' the mkfile causes $GOPATH/src and $GOROOT/src to be searched through. as an aside, placing local code in $GOROOT/src is frowned upon, $GOPATH should be used for everything that's not part of the standard "distribution".