-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusion about the name of go module #33274
Comments
main.go:
|
The module name doesn't have to be "github.com/shenshouer/container", but it can't just be "container". In general, names without dots in the first component are reserved for standard library packages, and there is in fact a standard library directory named "container" already. You can make up something like "example.com/container" if you really don't want to use your GitHub path, but it's recommended that you use a full |
@ccbrown has it right. Module paths with a dotless first element are allowed, but are in general reserved for the standard library. |
Duplicate of #32819 |
@ccbrown I see, Thanks |
What version of Go are you using (
go version
)?I build a project at dir name container, with main.go in dir.
Cannot build the project if the module name is
container
, the content of go.mod :And build error:
can't load package: package container: no Go files in /usr/local/go/src/container
It worked fine if I change the name of module with
github.com/shenshouer/container
Must the name of module be like
github.com/shenshouer/container
?The text was updated successfully, but these errors were encountered: