Go程序包命名约定背后的想法是什么?

I'm trying to understand the idea behind package naming convention in Go. Most packages are installed and imported as something like:

import "github.com/howeyc/fsnotify"

I get the idea that package names should be unique, but I don't see the point of using the website github.com. Why not just use author/package? Like:

import "howeyc/fsnotify"

That's not likely to ever collide. Or some other "shorter" strategy? Is it because it "just works" with go get? Or is there some other reason?

You can use howeyc/fsnotify if you want to. When github.com/howeyc/fsnotify is used it's understood that the package is hosted on Github. Other repositories work as well.

The reason is it makes it easier to locate and install dependencies with go get. Otherwise you'd have to satisfy the dependencies manually. And since forking repos is quite common in the open-source world, you may have a modified version from the same author. So it helps to distinguish what your project depends on.

Download and install packages and dependencies

Usage:

go get [-d] [-fix] [-u] [build flags] [packages]

Get downloads and installs the packages named by the import paths, along with their dependencies.

When checking out or updating a package, get looks for a branch or tag that matches the locally installed version of Go. The most important rule is that if the local installation is running version "go1", get searches for a branch or tag named "go1". If no such version exists it retrieves the most recent version of the package.

For more about specifying packages, see 'go help packages'.

For more about how 'go get' finds source code to download, see 'go help remote'.

The import path supports the go get command. Paths denoting remote repositories begin with the path to the code. Run the go help remote command for details.