Questions tagged [goland]

GoLand is an IDE by JetBrains for the Go programming language

Links:

  1. Official Site
  2. Documentation Pages
  3. Download Page
  4. The GoLand Blog
538 questions
16
votes
8 answers

GoLand on Apple Silicon can not debug golang project

Edit 2021-01-28: This whole question is now obsolete because GoLand 2020.3.2 was released today, and it includes a working delve. Don't forget to remove alterations you might have made, as the release notes point out. I am trying to debug golang…
user14892075
  • 171
  • 1
  • 1
  • 3
14
votes
2 answers

Go text template syntax highlighting in GoLand

GoLand has syntax support on Go html files with the file extension of .gohtml So what about Go text files? Does GoLand support that as well? .tmpl is supported by vim-go but not GoLand.
Jim yu
  • 141
  • 1
  • 3
14
votes
9 answers

Valid methods in being highlighted in red 'Unresolved Reference'

How to solve this problem? The program works. But the methods in Gogland are highlighted in red. Qt version 5.8 is added. Gogland (1.0 Preview) 1.0 EAP Build #GO-171.4694.61, built on June 27, 2017 Gogland EAP User Expiration date: September 25,…
Sergey Andrianov
  • 508
  • 1
  • 4
  • 13
13
votes
1 answer

What is the little "a:" for/mean in GoLand?

In the JetBrains GoLand IDE, when I type a basic "Hello, World!" example, there is a small a: in front of the string passed to fmt.Println() that is added by the IDE. What does it mean and what is its purpose? I could not find the answer in the…
Dan
  • 4,488
  • 5
  • 48
  • 75
13
votes
2 answers

GOPATH is empty (Gogland IDE)

I am pretty new to Go and Gogland. I just downloaded 'go1.8.3.windows-amd64.msi', installed it in C Drive and then started writing my programs in a notepad and then finally running it from a terminal. I am facing some issues with Gogland. I have…
Shinchan
  • 331
  • 1
  • 3
  • 13
12
votes
2 answers

Fix GoLand not finding module dependencies ("cannot resolve...")?

I have installed my project's Go module dependencies with go build. But GoLand is telling me it cannot resolve any of these dependencies. How can I get GoLand to find the Go module dependencies?
sdgluck
  • 24,894
  • 8
  • 75
  • 90
11
votes
1 answer

What is the goroutine named runtime.gopark?

I am debugging a program written in go via Goland. In the debugger, I can choose between different goroutines that are running. I found alongside my goroutines there is a lot of other goroutines named runtime.gopark and I suspect these are other…
Bat
  • 771
  • 11
  • 29
11
votes
2 answers

Goland does not recognise my vendor directory with Go 1.14

When I open my Goland project, the following command is run: /usr/local/Cellar/go/1.14/libexec/bin/go list -m -json all #gosetup Its output is the following error: go list -m: can't compute 'all' using the vendor directory (Use -mod=mod or…
Youcha
  • 1,534
  • 2
  • 16
  • 30
11
votes
5 answers

How can I see if the GoLand debugger is running in the program?

In C# the executing program can detect if it's running in the debugger using: System.Diagnostics.Debugger.IsAttached Is there an equivalent in Go? I have some timeouts which I would like to be disabled while I am stepping through the code.…
Philip Beber
  • 1,115
  • 12
  • 18
10
votes
2 answers

When debugging, GoLand can not evaluate a function on M1

When debugging, use the Evaluate expression and try to evaluate a function. The result is shown as: "backend does not support function calls". Why? MacBook Pro M1 GoLand 2021.1.3 Go 1.16.5 arm64
graydove
  • 133
  • 1
  • 5
10
votes
1 answer

GoLand import go module public repo fails with invalid version

I want to import a module I have created into another project. The source code is in GitHub, in a public repo, but I get the following error when trying to import in GoLand: go: finding module for package github.com/ambye85/gophercises/link go:…
junglie85
  • 1,243
  • 10
  • 30
10
votes
1 answer

How to run the whole project in GoLand?

I have a small project with several .go files. When I run main.go only this compiles but nothing else, so my application crushes. I understand that I have to change settings in Run -> Edit Configurations, but don't know what to do exactly. IDE also…
Roman
  • 459
  • 1
  • 8
  • 17
9
votes
1 answer

golang mkdir /usr/local/go/pkg/mod permission denied

OS: Windows 11 WSL2; IDE: Goland Latest I am trying to open my IDE Goland, but I get this error when the IDE tries to index my project. warning: GOPATH set to GOROOT (/usr/local/go) has no effect go: mkdir /usr/local/go/pkg/mod: permission…
niepl
  • 141
  • 1
  • 4
9
votes
1 answer

Why doesn't my Go debugger load all symbols, causing local variables to be missing from the debugger?

I've built my binary with: go build -gcflags "$gc_flags" -o ./bin/grafana-server ./pkg/cmd/grafana-server, where $gc_flags is '-N -l'. When I run this file, ./bin/grafana-server, and attach to it in my debugger (Goland), not all of my symbols are…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
9
votes
6 answers

golang unexpected directory layout

So I downloaded minio from github.com/minio/minio I want to run it from the source, I create my directory like: ~/Downloads/minio-RELEASE.2017-06-13T19-01-01Z | src | all minio directories, including vendor, like the image below I also use…
Wingzero
  • 9,644
  • 10
  • 39
  • 80
1
2
3
35 36