-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: can't load package: package main: cannot find package "main" in any of: /usr/local/go/src/main (from $GOROOT) /Users/josuezafra/go/src/main (from $GOPATH) #35000
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
Comments
Did you type exactly |
I'm having a similar problem. I keep getting |
@dylan844r What precisely do you do? |
@ianlancetaylor C:\Users\shumb>go build |
@dylan844r The formatting is a bit wonky but it looks like you ran a simple If you ran This is not the same problem as the original issue here, which does not say |
@ianlancetaylor Yes I did type it correctly. Sorry for not answering earlier, I was very busy with oher things I actually did type go build main.go, I just don't know why that happens. |
I can recreate the problem exactly if I type
I cannot recreate it if I type
I don't know why you are seeing what you are seeing. |
@JZafrag, please fill out the complete issue template. (You can get a fresh copy from https://golang.org/issue/new.) In order to diagnose the problem, we need to know the Go version in use, the output of |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
So I just got this error in the cmd when I tried to run a simple program:
package main
import (
"net/http"
)
func main() {
http.listenAndServe(":3000", nil)
}
And the error I got while trying to run
go build main.go
:$ go build main.go can't load package: package main: cannot find package main in any of:
/usr/local/go/src/main (from $GOROOT)
/Users/josuezafra/go/src/main (from $GOPATH)
I'm sorry if this is not an error from Go but from myself, I literally started learning Go today
The text was updated successfully, but these errors were encountered: