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 opened this issue Feb 28, 2021 · 4 comments
Closed

x/tools/gopls: Go error notification #44693

Jassi10000 opened this issue Feb 28, 2021 · 4 comments

Comments

@Jassi10000
Copy link

@Jassi10000 Jassi10000 commented Feb 28, 2021

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 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

@stamblerre stamblerre commented Mar 3, 2021

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.

@Jassi10000
Copy link
Author

@Jassi10000 Jassi10000 commented Mar 3, 2021

@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

@stamblerre stamblerre commented Mar 3, 2021

@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

@stamblerre stamblerre commented Mar 11, 2021

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

@stamblerre stamblerre closed this Mar 11, 2021
@stamblerre stamblerre removed this from the gopls/v1.0.0 milestone Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants