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

x/tools/gopls: Go error notification #44693

Closed
Jassi10000-zz opened this issue Feb 28, 2021 · 4 comments
Closed

x/tools/gopls: Go error notification #44693

Jassi10000-zz opened this issue Feb 28, 2021 · 4 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@Jassi10000-zz
Copy link

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

$ go version
go version go1.16 windows/amd64

Does this issue reproduce with the latest release?

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\dell\AppData\Local\go-build
set GOENV=C:\Users\dell\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Go\bin\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Go\bin
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 GOVCS=
set GOVERSION=go1.16
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
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\dell\AppData\Local\Temp\go-build3505164714=/tmp/go-build -gno-record-gcc-switches

What did you do?

I just install / modify all the packages of GoLang in Command Pallette in VS - Code

What did you expect to see?

I don't expect to see the error mentioned in next ques

What did you see instead?

Error loading workspace: You are outside of a module and outside of $GOPATH/src. If you are using modules, please open your editor to a directory in your module.

@seankhliao seankhliao changed the title Go error notification x/tools/gopls: Go error notification Feb 28, 2021
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 28, 2021
@gopherbot gopherbot added this to the Unreleased milestone Feb 28, 2021
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Mar 3, 2021
@stamblerre
Copy link
Contributor

It sounds like you're working outside of a module, so I would recommend creating a module by using the go mod init command.

Also, can you please share your gopls logs? Information on how to capture them can be found here.

@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 3, 2021
@Jassi10000-zz
Copy link
Author

@stamblerre Actually mam am totally new to Go, that's why facing so many issues, I have followed the official steps on the website of Go ,but still the results were not good

can you pls guide me through the steps so I can start fresh and avoid these errors

@stamblerre
Copy link
Contributor

@Jassi10000: Have you taken a look at https://golang.org/doc/tutorial/getting-started or https://blog.golang.org/using-go-modules? Otherwise you may be able to get some help in the #newbies channel of the Gophers Slack.

@stamblerre
Copy link
Contributor

Closing this issue as there hasn't been activity on it for over a week.

@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Mar 11, 2021
@golang golang locked and limited conversation to collaborators Mar 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. 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