Skip to content
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

Go build cant load package #35022

Closed
dylan844r opened this issue Oct 20, 2019 · 2 comments
Closed

Go build cant load package #35022

dylan844r opened this issue Oct 20, 2019 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@dylan844r
Copy link

dylan844r commented Oct 20, 2019

What version of Go are you using (go version)?

$ go version 13.1

Does this issue reproduce with the latest release?

I'm not sure

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\****\AppData\Local\go-build
set GOENV=C:\Users\****\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Projects\Go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\****\AppData\Local\Temp\go-build733011846=/tmp/go-build -gno-record-gcc-switches

What did you do?

Tried to use 'go build' but didn't work

'C:\Users*******>go get github.com/Team254/cheesy-arena

C:\Users**>go build
can't load package: package .: no Go files in C:\Users*

C:\Users*******>'

What did you expect to see?

For it to complete the command

What did you see instead?

'can't load package: package .: no Go files in C:\Users******'

@ianlancetaylor
Copy link
Member

As I said in the other issue, this is normal.

go get github.com/Team254/cheesy-arena

This will fetch the package into the module cache.

go build

This will build the package in the current directory, but there is no package in the current directory. Running go get does not put a package in the current directory. If you look in the current directory you will see no .go files. That is what the go command is telling you.

Try running

go build github.com/Team254/cheesy-arena

@ianlancetaylor ianlancetaylor added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 20, 2019
@dylan844r
Copy link
Author

dylan844r commented Oct 20, 2019

@ianlancetaylor Thanks! That really helped

@golang golang locked and limited conversation to collaborators Oct 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants