upspin: add import comments to all packages
This need only be added to one package declaration per package
(not every file in the package) so I only did that.
The change was made mechanically with this command:
for import in $(go list upspin.io/...); do
fn=$(ls $GOPATH/src/$import/*.go | grep -v _test.go | head -n 1)
sed -i '' 's_^package .*$_& // import "'$import'"_' $fn
About import comments, from 'go help importpath':
When the custom import path feature described above redirects to a
known code hosting site, each of the resulting packages has two possible
import paths, using the custom domain or the known hosting site.
A package statement is said to have an "import comment" if it is
immediately followed (before the next newline) by a comment of one of
these two forms:
package math // import "path"
package math /* import "path" */
The go command will refuse to install a package with an import comment
unless it is being referred to by that import path. In this way, import
comments let package authors make sure the custom import path is used
and not a direct path to the underlying code hosting site.
Reviewed-by: Eduardo Pinheiro <email@example.com>
4 files changed
This directory contains components that are experimental or under development.